Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello guys, I need help by defining a parent from list of accounts for parent-child hierarchy.
I have table Account No_ and Totaling. Totaling shows what account it's summing up.
No_ | Totaling |
01 | 0101..0103 |
0101 | |
0102 | |
0103 | |
1 | |
11 | 111..11509 |
111 | 11101..11109 |
11101 | |
11108 | |
11109 | |
112 | 11201..11209 |
11201 | |
11208 | |
11209 | |
113 | 11301..11309 |
11301 | |
11308 | |
11309 | |
114 | 11401..11409 |
11401 | |
11403 | |
11408 | |
11409 | |
115 | 11501..11509 |
11501 | |
11503 | |
11508 | |
11509 | |
116 | |
12 | 120..12714 |
120 | 12001..12009 |
12001 | |
12002 | |
12009 |
I need Power BI to calculate the first parent.
Have you any ideas? DAX or M would be both good.
Solved! Go to Solution.
@Anonymous ,
In general, you can use hierarchy dax functions like PATH() or IsInScope(). For more details, I would suggest you to refer to third-party blogs below:
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
https://powerpivotpro.com/2018/09/using-dax-to-handle-multiple-parent-hierarchies/
https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
In general, you can use hierarchy dax functions like PATH() or IsInScope(). For more details, I would suggest you to refer to third-party blogs below:
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
https://powerpivotpro.com/2018/09/using-dax-to-handle-multiple-parent-hierarchies/
https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.