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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Find parent in Parent-child hierarhy by Totalling

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
010101..0103
0101 
0102 
0103 
1 
11111..11509
11111101..11109
11101 
11108 
11109 
11211201..11209
11201 
11208 
11209 
11311301..11309
11301 
11308 
11309 
11411401..11409
11401 
11403 
11408 
11409 
11511501..11509
11501 
11503 
11508 
11509 
116 
12120..12714
12012001..12009
12001 
12002 
12009 

I need Power BI to calculate the first parent.

Have you any ideas? DAX or M would be both good.

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@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.

 

 

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@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.

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.