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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Need to create levels of hierarchy

Hi All,

Below is my sample data,

 

RohiniP-26_4-1609960914076.png

 

My table has 3 columns, No, start No and end No. Start and end No is the begining and Ending of 'No' range, but it is given at the end row of each range. I need to split this into range of hierarchy levels. Below is my expected output,

RohiniP-26_5-1609960963191.png

 

1000 - 1005 and 2000 - 2002 is the first level of hierarchy ,101-200 and 201-300 is the second level of hierarchy, 10 - 11 is the third level of hierarchy. I want to put the starting range No in the respective columns (ie...first,second,third level).

 

I need to calculate the last 3 columns using dax or power query.

 

Thanks in Advance....

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I think you may get first one like this

First Level =
maxx(filter(Table, [no] >= earlier([Start No]) && [no] <=earlier([end No]) && [Start No] >=1000 && [no] >=1000),[Start No])

 

For second and thrid you need have index and more complex calcultion. Unless data in in table format I can not try.

 

But I also think this not a good data to work with.

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
lbendlin
Super User
Super User

Tell whoever provided you with the source data that it is of insufficient quality. Ask them for better source data.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.