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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tcboutte
Regular Visitor

Dynamically Create Hierarchy from Flat Table

I have the following table coming in and need to assign hierarchies to it based on the pattern of the numbering convention. This seems like a common need, but I haven't hit on anything that would work so far. The first digit of the code assigns it to a Level 1 parent, the 2nd digit to a level 2 parent, and digits 3 and 4 to a level 3 parent.

 

The table currently looks like this: 

tcboutte_3-1631209207476.png

 

I would want to use DAX expressions or Power Query to populate the level columns like this:

tcboutte_2-1631209154902.png

Thanks!

1 REPLY 1
lbendlin
Super User
Super User

yes, that should be easy. Please provide sample data in usable format (not as a picture - maybe insert into a table?).

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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