This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
So I have this table that is not in the format that I would like. What I'm tryign to do is create a table in Power Query that will return
| Area | Feeder | Device |
| EAI | 34 | 34 |
| EAI | 1501A | 1501A |
| EAI | 1501A | 6R21 |
| EAI | A162 | A162 |
| EAI | A162 | 2X29 |
| ELA | 4017 | L7511 |
| ELA | 4017 | L8312 |
How can I accomplish this?
Solved! Go to Solution.
=Table.FromPartitions("Area",Table.ToRows(Table.Group(YourTable,"Column1",{"n",each Table.PromoteHeaders(Table.Skip(Table.Transpose(_)))})))
This worked perfectly, thanks so much. Do you have any tips/tricks/information on how I can get better and understand Power Query like this?
1 group your data by ID
2 in each group, transpose the sub table, and skip the first row, and promote the first row as headers.
3 transform the table to a list of lists, which item is a list, of which the first item is a value and the second is a table.
4 use Table.FromPartitions to expand that list to table
=Table.FromPartitions("Area",Table.ToRows(Table.Group(YourTable,"Column1",{"n",each Table.PromoteHeaders(Table.Skip(Table.Transpose(_)))})))
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.