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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
hi team, How to calculate hierarchy level contribution
expected output
office group sales is 33774 - 63.97%
ink -25.79%
note- 31.23%
pen - 42.97%
school group sales is 19020- 36.03%
ink -3.31%
note- 94.04%
pen - 2.65 %
Total Sales is 52794 - 100%
Solved! Go to Solution.
Hi @rajasekar_o ,
I create a table as you mentioned.
Then I use it in the Matrix visual.
I create a measure and here is the DAX code.
Measure =
IF (
HASONEVALUE ( 'Table'[AMOUNT] ),
MAX ( 'Table'[Column] ),
SUM ( 'Table'[AMOUNT] ) / CALCULATE ( SUM ( 'Table'[AMOUNT] ), ALL ( 'Table' ) )
)
Finally I get what you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rajasekar_o ,
I create a table as you mentioned.
Then I use it in the Matrix visual.
I create a measure and here is the DAX code.
Measure =
IF (
HASONEVALUE ( 'Table'[AMOUNT] ),
MAX ( 'Table'[Column] ),
SUM ( 'Table'[AMOUNT] ) / CALCULATE ( SUM ( 'Table'[AMOUNT] ), ALL ( 'Table' ) )
)
Finally I get what you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.