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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
Lets say I have this :
| ID | ParentID | Name | Firts parent Name |
| 1 | 0 | Name1 | Name1 |
| 2 | 0 | Name2 | Name2 |
| 3 | 1 | Name3 | Name1 |
| 4 | 1 | Name4 | Name1 |
| 5 | 2 | Name5 | Name2 |
| 6 | 3 | Name6 | Name1 |
| 7 | 5 | Name7 | Name2 |
How do I achive the last column as a calculated column?
Thanks!
I actually need to "go up" until I have a 0 in parent_id. I can have more than 5-6 layers in reality.
I tried your code and it almost work, but some doesnt "climb" to the top parent
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |