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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
t_guet01
Helper I
Helper I

How do I create a hierarchy from an input table (in Query Editor)?

Hey guys,

 

I do want to create a hierarchy - but not really the so called "hierarchy" in the DAX view. I mean an organizational hierarchy with different levels of aggregation. That's how my input data look like:

 

IdentNameTitleLevel
animalsAnimals 1
a02MammalsAnimals2
a0203DogsMammals3
a020307RetrieversDogs4
a04FishAnimals2
a0405SharksFish3
a040509SawsharksSharks4
............

 

I basically want an output table like this (down to level 4):

 

IdentLevel 1Level 2Level 3Level 4
a020307AnimalsMammalsDogsRetrievers
a040509AnimalsFishSharksSawsharks

 

I tried with pivoting, but for the 4th level, ist leaves levels 1 and 2 blank, which I dont want.

 

Any ideas?


Thank you guys.

2 REPLIES 2
Anonymous
Not applicable

Hi @t_guet01,

Did amitchandak 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept his suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@t_guet01 , Have you checked path functions, can not help ?

 

https://radacad.com/parsing-organizational-hierarchy-or-chart-of-accounts-in-power-bi-with-parent-ch...

 

https://www.thebiccountant.com/2019/10/03/parent-child-hierarchies-with-multiple-parents-in-power-bi...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.