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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
AGo
Post Patron
Post Patron

List eventual child ID knowing parent ID in a hierarchy

Hello,

I've got a parent-child table with calculated levels (in this case max depth is 4), eg. my first 34 rows, it's written in numbers but the type is text.

ParentIDDepthLevel 1Level 2Level 3Level 4
1111111000
11122111200
11132111300
11142111400
11152111500
121631112160
121731112170
121831112180
121931112190
1620411121620
2121121000
21222212200
21232212300
21242212400
21252212500
222632122260
222732122270
222832122280
222932122290
2630421222630
3131131000
2252304217218225230
2252314217218225231
2252324217218225232
236237223623700
236238223623800
236239223623900
236240223624000
236241223624100
23724232362372420
23724332362372430
23724432362372440
23724532362372450
2422464236237242246

 

I would like to create a calculated column that returns the child (grandchildren also and so on) ID list with concatenation, for each ID, of course only if the have descendants (if not it's blank).

I would then use this function in another measure like this CALCULATE(SUM(value);[id] in {PreviousCalculatedFunction}) in a table viz next to ID field.

 

Is it possible?

Thanks!

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Sounds like you want PATH

https://docs.microsoft.com/en-us/dax/path-function-dax



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.