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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dorukturkoglu
Helper I
Helper I

Percentage of subtotals in a matrix

Hi all,

 

I have a measure which I am calculating it over a period of months and channel, and under each channel i have another variable. I use the matrix visual, and for the measure i choose show it as column total. However when I dig one level, i see that percentages are based on grand column total, not subtotal

 

I would like the sub types to add up to %100 for each channel, is that doable?

Please note that the value i am showing in matrix is a measure, not a column

 

dorukturkoglu_0-1709116956550.png

 

dorukturkoglu_1-1709117051147.png

 

 

 

 

Thanks

 

1 ACCEPTED SOLUTION
tharunkumarRTK
Solution Sage
Solution Sage

@dorukturkoglu 

There are many ways to achieve this, here is one 

[Measure] = 
Var __ChannelSales = calculate([Total], allselected(Table[Program]))
Var result = if( isinscope(Table[Program]), divide([Measure], __ChannelSales), 1  )

Return result

Here is one example:

Screenshot 2024-02-28 at 4.56.25 PM.png

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

View solution in original post

3 REPLIES 3
tharunkumarRTK
Solution Sage
Solution Sage

@dorukturkoglu 

There are many ways to achieve this, here is one 

[Measure] = 
Var __ChannelSales = calculate([Total], allselected(Table[Program]))
Var result = if( isinscope(Table[Program]), divide([Measure], __ChannelSales), 1  )

Return result

Here is one example:

Screenshot 2024-02-28 at 4.56.25 PM.png

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

Hi,

 

Thanks a lot for your prompt response!

 

It works however I would need to add the new metric as a separate 'value', and i have multiple months as columns, so it makes the table cluttered.

 

Is it possible to have achieve this with a single metric? I want to see the channel contribution as lets say %5, and want to see the breakdown by %40 and %60 when I click to the plus sign.

@dorukturkoglu 

I would suggest you to checkout this article. You should be able to build the logic as per your requirement 

https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.