Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
carmel_owen
Frequent Visitor

Hierarchy in Power Query Editor

I am trying to create a table from data that already has parent details in it, with the aim that there is a text value for each level of the hierarchy, for each 'Name'- I don't know if its my logic thats at fault, or maybe I need to do some further modelling, but I can't work out what to do without doing a massive IF statement for each column? 

 

Below is an example of my table with the data that is already present from the datasource. The 'ID' and the 'Name' columns are unique and I ultimately want for example, for a Level 7 name, the level 6 column should have the name that matches Level 6 for the Parent 6 column, then Level 5 would have the name that matches Parent 5 etc etc. So then when I use a slicer it will have those hierachy steps in? Those columns are currently blank, and I can't work out how to fill them, fill down won't work as the names need to be connected to the 'Parent' column. 

 

 

carmel_owen_0-1690888655740.png

 

1 REPLY 1
carmel_owen
Frequent Visitor

IDParent 1Parent 2Parent 3Parent 4Parent 5LevelNameLevel 7Level 6Level 5Level 4Level 3Level 2Level 1
10000PHL-A-10PHL-A-10-10PHL-A-10-10-10PHL-A-10-10-10-10PHL-A-10-10-10-10-10006tdlnt tdlcdlivcxbldlnulltdlnt tdlcdlivcxbldlnullnullnullnullnull
10900PHL-A-10PHL-A-10-10PHL-A-10-10-10PHL-A-10-10-10-20PHL-A-10-10-10-20-10907dlxtdltncxl Ddlvdllpkpmdlnt Incpkmdldlxtdltncxl Ddlvdllpkpmdlnt Incpkmdlnullnullnullnullnullnull
25000    Unassigned2Intdltncxl Incpkmdl: cxdministtcxtipkn FdldlnullnullnullnullnullIntdltncxl Incpkmdl: cxdministtcxtipkn Fdldlnull
63100PHL-A-10PHL-A-10-10PHL-A-10-10-40PHL-A-10-10-40-10PHL-A-10-10-40-10-63105Scxldl Ptpkcdldlds - Hpkusing  PtpkpdlttidlsnullnullScxldl Ptpkcdldlds - Hpkusing  Ptpkpdlttidlsnullnullnullnull
null    [Account]1Npkt cxppliccxbldlnullnullnullnullnullnullNpkt cxppliccxbldl
nullPHL-A-10   PHL-A-103pkpdltcxting Sutplusnullnullnullnullpkpdltcxting Sutplusnullnull
nullPHL-A-10PHL-A-10-10  PHL-A-10-104TutnpkvdltnullnullnullTutnpkvdltnullnullnull

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.