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

Reply
smpa01
Super User
Super User

PATH Partition by

Is there any way to build a path that is to be partitioned by an additional partition column (group by column)

 

desired result - partitioned by Q

| Q | parent | child | rowNum | path  |
| - | ------ | ----- | ------ | ------|
| 1 | 19     | 24    | 1      | 19|24 |
| 1 | 19     | 20    | 2      | 19|20 |
| 1 | 19     | 19    | 3      | 19|19 |
| 2 | 30     | 24    | 4      | 30|24 |
| 2 | 30     | 20    | 5      | 30|20 |
| 2 | 30     | 30    | 6      | 30|30 |
| 2 | 19     | 18    | 7      | 19|18 |
| 2 | 19     | 19    | 8      | 19|19 |

 

currently getting

smpa01_0-1728498558621.png

 

sample data

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTK0BBJGJkqxOsh8A1Q+kADxjYBMYwOEegTfAJVvjOBD9Fug8YHmxQIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Q1 = _t, parent = _t, child = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Q1", Int64.Type}, {"parent", Int64.Type}, {"child", Int64.Type}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "rowNum", 1, 1, Int64.Type),
    #"Renamed Columns" = Table.RenameColumns(#"Added Index",{{"Q1", "Q"}})
in
    #"Renamed Columns"

 

@AlexisOlson 

 

Thank you in advance.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION

For a data like this, a path can be simply built out by doing this

 

smpa01_0-1728580449999.png

 

and other path callbacks work perfectly on that "built-out path". I did think it would be so simple. Not sure, if this is going to create any issues later, but for now I am working with this.

 

smpa01_1-1728580484296.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

6 REPLIES 6
AlexisOlson
Super User
Super User

It doesn't appear that PATH can operate on a subtable, so a workaround is to concatenate Q with parent and child to create a unique identifier for each child. You can then create a path on this concatenation and then undo the concatenation if you wish.

AlexisOlson_0-1728574327035.png

For a data like this, a path can be simply built out by doing this

 

smpa01_0-1728580449999.png

 

and other path callbacks work perfectly on that "built-out path". I did think it would be so simple. Not sure, if this is going to create any issues later, but for now I am working with this.

 

smpa01_1-1728580484296.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

Hi @smpa01 ,

It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered? If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!

If you only have two levels, then you really don't need the fancy PATH functions. They're more needed for arbitrarily many levels of a ragged hierarchy. 

lbendlin
Super User
Super User

To use multi parent hierarchies you need to disambiguate/clone the children.  Child 20 needs to be split into 20.1 and 20.2

 

cf.  Parent-Child Hierarchies with multiple parents in Power BI with Power Query (thebiccountant.com)

I am not looking for a power query solution, as long as, each parent-child pair has a corresponding partition by column as it is in my case, a simple dax concatenation of parent, child with '|' would create the path, where all the related path callbacks apply

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors