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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Clustered column chart - GT% within the X axis category

I have a clustered column chart visualization which looks like this: 

mpataki32_0-1718181126814.png

What I would like to achieve to calculate GT%, but not using the real grand total, but the X-axis Category elements totals, for example: 

 

Category 1 Sub-category 1 should be 35,44%

and here is the breakdown of the cacluation: 
Summing up the Category 1 elements: 2879 + 1462 + 234 + 549 + 2600 + 399 = 8123

Then Category 1 GT will be divided by the Category 1 - Subcategory 1 = 2879 / 8123 = 35,44%

Which DAX calculation can I use, I tried ALLEXPECT and other functions without success. 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Anonymous 

You can use a measure :

Percentage classes = DIVIDE([your regular measure],CALCULATE([your regular measure],ALLSELECTED('your table'[subcategory])))
For example :
Percentage classes = DIVIDE([orders qty],CALCULATE([orders qty],ALLSELECTED('orders'[Ship Mode])))
Will give as a result :
Ritaf1983_0-1718182633406.png

The pbix is attached 

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
Uzi2019
Super User
Super User

Hi @Anonymous 
Simply try below measure

 

subtotal =
var a= CALCULATE(SUM(Table[Sales]),ALL(Lumix[Sub Catrgory]))
var b= DIVIDE(SUM(Table[Sales]),a,0)
return b

Uzi2019_0-1718183640672.png

 

 

I hope i answered your question!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Ritaf1983
Super User
Super User

Hi @Anonymous 

You can use a measure :

Percentage classes = DIVIDE([your regular measure],CALCULATE([your regular measure],ALLSELECTED('your table'[subcategory])))
For example :
Percentage classes = DIVIDE([orders qty],CALCULATE([orders qty],ALLSELECTED('orders'[Ship Mode])))
Will give as a result :
Ritaf1983_0-1718182633406.png

The pbix is attached 

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

How obvious... thank you so much! 🙂

Happy to help😊

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.