Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Power BI Gurus,
I have a multi level hierarchy table:
ChildID | ChildName | ParentID | ParentName |
a | AAA | ||
b | BBB | a | AAA |
c | CCC | a | AAA |
d | DDD | c | CCC |
e | EEE | d | DDD |
f | FFF | d | DDD |
I can create a flat view with calculated columns:
path = path('Table'[ChildID ],'Table'[Parent ID ] )
Level1 = LOOKUPVALUE('Table'[ChildName ],'Table'[ChildID ],PATHITEM('Path'[path],1,INTEGER))
Level2 = LOOKUPVALUE('Table'[ChildName ],'Table'[ChildID ],PATHITEM('Path'[path],2,INTEGER))
Level3...
ChildID | Level1 | Level2 | Level3 | Level4 |
a | AAA | |||
b | AAA | BBB | ||
c | AAA | CCC | ||
d | AAA | CCC | DDD | |
e | AAA | EEE | DDD | EEE |
f | AAA | FFF | DDD | FFF |
I would like to get to this view where the Level value only shows if it corresponds to the last ( or only) item in the path.
ChildID | Level1 | Level2 | Level3 | Level4 |
a | AAA | |||
b | BBB | |||
c | CCC | |||
d | DDD | |||
e | EEE | |||
f | FFF |
Is this possilbe?
Thank you
Solved! Go to Solution.
Hi, @ogend
You can try something like:
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/
Proud to be a Super User!
Hi @ogend ,
Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @ogend
You can try something like:
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/
Proud to be a Super User!
Query PATHLENGTH() and then fetch the last item.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.