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

Using a hierchial Path in Dax to split out levels

I have gotten the hierarchial Path in dax,  from 2 columns called assetnum and parent ie. some of the levels go up to 8 some only have one, how can i now further split this out in DAX, is there a way to split the levels so i can build a hierachy from it.  In other words like in the query editor split by delimiter but in dax because there doesn't seem to be  way to push that back to the query editor (the path calculated column)

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi vanessafvg ,

 

In this senario, you can use SUBSTITUTE and PATHITEM function to achieve split columns in dax, please refer to this blog:

https://www.nimblelearn.com/using-dax-to-split-delimited-text-into-columns/.

 

Regards,

Jimmy Tao

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi vanessafvg ,

 

In this senario, you can use SUBSTITUTE and PATHITEM function to achieve split columns in dax, please refer to this blog:

https://www.nimblelearn.com/using-dax-to-split-delimited-text-into-columns/.

 

Regards,

Jimmy Tao

v-yuta-msft
Community Support
Community Support

Hi vanessafvg,

 

So your requirement is to split one column which contains hierarchial Path data into several sub columns, right? You should use "Split Columns" in query editor because dax can't shape and transform data because both measure and calculate column are in report level which can't affect data model.

 

Regards,

Jimmy Tao

@v-yuta-msft thats the whole point i cant use query editor because the path data gets created in dax





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.