Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Pivoting Data

Hi all, I have the below problem. I would like to pivot my data from 

to

 

  •     one = Table.ToList(
            your_table, 
            (w) => List.TransformMany(
                {w}, 
                (x) => List.Skip(List.Split(x, 2)),
                (x, y) => List.FirstN(x, 2) & y
            )
        ),
        two = Table.FromList(List.Combine(one), (x) => x, {"Name", "Phone", "Address", "State"})

1 Reply

  •     one = Table.ToList(
            your_table, 
            (w) => List.TransformMany(
                {w}, 
                (x) => List.Skip(List.Split(x, 2)),
                (x, y) => List.FirstN(x, 2) & y
            )
        ),
        two = Table.FromList(List.Combine(one), (x) => x, {"Name", "Phone", "Address", "State"})