Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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(_)))})))
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 7 |