Forum Discussion
From tabular- to compact form
Hi All,
I hope you can help me out.
I have a data tabel with two columns representing a hierarchy. I want to merge these two columns into a single column, where the hierarchical structure is kept in the same way as a pivot table works when you move from tabular layout to compact form.
Sample data below:
| Lvl 1 | Lvl 2 | Compact form | |
| Chair | Legs | Chair | |
| Chair | Seat | Legs | |
| Bed | Bed frame | Seat | |
| Bed | Mattress | Bed | |
| Bed | Legs | Bed frame | |
| Mattress | |||
| Legs |
Any suggestions how to achieve this in PQ?
Thanks,
Jacob
Hi Anonymous ,
As I know, we could merge all value in the same column, but there is no hierarchy in same column in Power Query. If you want to display hierarchy, you could put these field in Row field of Matrix in powerbi.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- lbendlinSuper User
why would you want to do that, and how would you then know that Legs is a child of Chair ?
- daxCommunity Support
Hi Anonymous ,
As I know, we could merge all value in the same column, but there is no hierarchy in same column in Power Query. If you want to display hierarchy, you could put these field in Row field of Matrix in powerbi.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.