Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have simple task, I need to obtain the 'Grandparent' of an item. The Parent ID is already a column in the data, just need the Granparent ID. I tried LOOKUPVALUE, but I don't know what the 3rd argument will be?
Parent_of_Parent_ID = LOOKUPVALUE('Table'[Parent ID], 'Table'[ID], )
| Name | ID | Parent ID | Expected_Output (Parent of Parent) |
| foo | 10 | 12 | 15 |
| bar | 12 | 15 | 18 |
| baz | 15 | 18 | |
| buzz | 18 |
Solved! Go to Solution.
Hi @saralsaral ,
You can try below code:-
Parent of Parent =
VAR _path =
PATH ( 'Parent_hirarchy'[ID], Parent_hirarchy[Parent ID] )
RETURN
PATHITEMREVERSE ( _path, 3 )
Output:-
Thanks
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @saralsaral ,
You can try below code:-
Parent of Parent =
VAR _path =
PATH ( 'Parent_hirarchy'[ID], Parent_hirarchy[Parent ID] )
RETURN
PATHITEMREVERSE ( _path, 3 )
Output:-
Thanks
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @saralsaral ,
https://docs.microsoft.com/en-us/dax/understanding-functions-for-parent-child-hierarchies-in-dax
Please refer above link.
Mark this as a solution if I answered your question.
Thanks.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |