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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors