Rows to Columns

Hello All
Any idea how to covert this?

Hi @wilson.yan,

I couldn’t find an easy way of doing this, but you could try first to construct a dictionary from the input data table. Each entry/key in the dictionary is a unique value from the “Name” column and the value of the dictionary will be a list with all “Results” for that “Name”.

In your example, the dictionary will look like this:
[“Apple” : [1], “Pear”: [1, 2, 3], “Orange”: [1], “Mango”: [1]]

Then, from that dictionary you could build the output data table:

  • For each key-value pair
    – add a column with the name as the key
    – add all rows values

Check out this workflow: ConvertRowsToColumns.xaml (18.6 KB)
It was created in 2018.3.2 so please update first if you are using an older version as it won’t open.



thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.