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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Kudoed Authors