Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi!
I have this particular table:
Variables | Values |
new person | 4 |
new person | 9 |
new person | 8 |
new person | 2 |
old person | 5 |
old person | 1 |
old person | 7 |
old person | 3 |
Now I want to convert the table in such a way that the final output should return this:
Variable | Value_1 | Variable | Value_2 |
new person | 4 | old person | 5 |
new person | 9 | old person | 1 |
new person | 8 | old person | 7 |
new person | 2 | old person | 3 |
So basically I want to split the variables and their associated values from one column to separate columns. Any tips / workarounds ?
Solved! Go to Solution.
=Table.FromColumns(List.Combine(Table.Group(PreviousStepName,"Variable",{"n",Table.ToColumns})[n]),List.TransformMany({0..List.Count(List.Distinct(PreviousStepName[Variable]))-1},each Table.ColumnNames(PreviousStepName),(x,y)=>if x=0 then y else y&"_"&Text.From(x)))
=Table.FromColumns(List.Combine(Table.Group(PreviousStepName,"Variable",{"n",Table.ToColumns})[n]),List.TransformMany({0..List.Count(List.Distinct(PreviousStepName[Variable]))-1},each Table.ColumnNames(PreviousStepName),(x,y)=>if x=0 then y else y&"_"&Text.From(x)))