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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.