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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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