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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
rainerpowerbi
Resolver I
Resolver I

power bi decomposition tree: % of subtotal

Hi,
decomposition-tree gives only the option showing share of an element in % of COMPLETE-TOTAL.

Is there an trick/option, that I can show the percent of the direct parent-level ?

(It is very important that user has to have further full flexibilty changing the chosen/selected elements (not fixed elements-structure as in other solutions).

My Goal-structure: (user can change element-structure complete free)

rainerpowerbi_1-1641328322791.png

 


For me this feature (% of subtoatl) is absolutely necesarry for user-acceptance.

Kind regards

Rainer

 





1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rainerpowerbi , You have to use isinscope and switch measure, but remember, you can not have it fully dynamic , which means if you swap country and product it might not work

 

Please find all measures 

M1 = divide([measure], calculate([Measure], allselected())

M2 = divide([measure], calculate([Measure], filter(allselected(Table), Table[Country] = max(Table[Country]) ))

or

M2 = divide([measure], calculate([Measure], allselected(Product)) //if product is separate dimension

 

Switch( True() ,

isinscope(Product[Product]), [M2],

[M1]

)

 

You can extend the switch with more conditions 

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
rainerpowerbi
Resolver I
Resolver I

Hi amitchandak,
thanks a lot for your answer !

I regret that in your and other solutions the user has no option to place the levels IN A COMPLETE FREE STRUCTURE. I hope that Microsoft will provide this feature (% of subtotal)  as soon as possible to increase user-acceptance.

Kind regards

Rainer

amitchandak
Super User
Super User

@rainerpowerbi , You have to use isinscope and switch measure, but remember, you can not have it fully dynamic , which means if you swap country and product it might not work

 

Please find all measures 

M1 = divide([measure], calculate([Measure], allselected())

M2 = divide([measure], calculate([Measure], filter(allselected(Table), Table[Country] = max(Table[Country]) ))

or

M2 = divide([measure], calculate([Measure], allselected(Product)) //if product is separate dimension

 

Switch( True() ,

isinscope(Product[Product]), [M2],

[M1]

)

 

You can extend the switch with more conditions 

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.