(Advanced?) Sorting problem

Anyone have an idea or experience with the following sorting situation:

TABLE Source        
Col1 Col2 Col3 Col4 Col5 Col6
b e        
d g e b  
d b f      
g f b d c e
to TABLE sorted        
Col1b Col2b Col3b Col4b Col5b Col6b
b c d e f g
b c d e   g
b   d   f  
b     e    
  c     f  

basically, I want to sort the empty cells as if they contained a value. The Row sort doesn't really matter,

most likely by Col1b and number of elements.

somehow via group-by? or temporary filling the empty ones with e.g. a column index?



Hello Docminus,

The first idea I have is to use a Column Aggregator to get the actual contents of each row. Then Ungroup them and do a Pivoting. Then sort the tables using two transpose nodes.

Attached you will find an example workflow that does this. There might be a more elegant way to do it, but this does the job.


Thank you so much!

Very helpful, appreciate your time!

Although I have a bit left to solve my ultimate goal, I discovered with the help of this solution some other errors on the way to the to be sorted matrix. Once I have corrected that, this should be the charm.