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
Anonymous
Not applicable

DAX for Percent of Column Total in Stacked Column Chart

Hi,

I just realized that the matrix table can show value as a percent of column total which is awesome. However when I made a copy of the same table and changed it to a stacked column chart, it didn't replicate same %values from the table. Also realized that the only option available in chart is "show value as a percent of grand total".

How do I make the stacked column chart replicate the table view with a dax measure? And also the values need to change dynamically based on slicer selections.

@VahidDM, @Greg_Deckler appreicate any help please. Thanks.

Screenshot 2021-10-08 170144.jpg

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@VahidDMthank you that worked but not as intended i.e. values add up to 100% for all months. I need them to add up to 100% for the each month.

Also when applying filter on slicers, the numbers don't add up to 100%. How to incorporate slicer selection to ensure that the values add up to 100%?

Screenshot 2021-10-11 131225.jpg

 

View solution in original post

Hi @Anonymous 

 

Change the visual to 100% Stacked column chart.

 

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

Appreciate your Kudos!!

 

View solution in original post

4 REPLIES 4
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this measure:

Measure = 
SUM ( 'Table'[TotalJobs] )
    / CALCULATE (
        SUM ( 'Table'[TotalJobs] ),
        ALLEXCEPT ( 'Table', 'Table'[LatestStatus] )
    )

 

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

Appreciate your Kudos!!

 

Anonymous
Not applicable

@VahidDMthank you that worked but not as intended i.e. values add up to 100% for all months. I need them to add up to 100% for the each month.

Also when applying filter on slicers, the numbers don't add up to 100%. How to incorporate slicer selection to ensure that the values add up to 100%?

Screenshot 2021-10-11 131225.jpg

 

Anonymous
Not applicable

Ah ok, perfect. Working now. Many thanks for your help @VahidDM , appreciate it

Hi @Anonymous 

 

Change the visual to 100% Stacked column chart.

 

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

Appreciate your Kudos!!

 

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.

Top Solution Authors