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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
YevD
Helper I
Helper I

Data labels as % of total in stacked column chart using Calculation Groups (pt.2)

Hi everyone,

 

I think I have reached a critical level of brain damage trying to implement the solution provided in the post below so any help here would be greatly appreciated.

 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Data-labels-as-of-total-in-stacked-column-cha...

 

I am trying to show % of total together with actual total in the stacked column like so:

YevD_0-1626905857554.png

 

When I try to apply this method to a new scenario I am getting the correct  % labels (those <100%) only for some series in the legend. Also something strange is happening in the y-axis (26%).

YevD_2-1626907400888.png

 

 

Below is DAX for the calculation group I am using. 

//IF (
// SELECTEDMEASURENAME () = "Total claims",
// IF ( // ISFILTERED ( 'Claims'[Status & Loss Type]),
// DIVIDE ( // [Total claims],
// CALCULATE ( [Total claims], ALLSELECTED ( 'Claims'[Status & Loss Type] ) )
// )
// ),
// SELECTEDMEASURE()
//)
SELECTEDMEASURE ()
Total claims = COUNTA(Claims[Status & Loss Type])
Status & Loss Type is a merged column from two separate columns
I also have several slicers in this report from Claims and another table.
 
Thank you for giving this a look.
 
Best,
YevD
3 REPLIES 3
YevD
Helper I
Helper I

@Fowmy  any chance you can give this a look? 

amitchandak
Super User
Super User

@YevD , Try one of the two . Type should be the legend column name

 

 

divide([Total claims], CALCULATE ( [Total claims], removefilters ( 'Claims'[Type] ) ))

 

or


divide([Total claims], CALCULATE ( [Total claims], filter ( allselected('Claims') ,'Claims'[Qtr] = max('Claims'[Qtr]) && 'Claims'[Year] = max('Claims'[Year]) ) ))

 

Use line visual to display total

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak, thanks for your suggestion. If I understood correctly, I am to use either of those measures in my column series of the line and stacked column chart? This works, however since columns add up tp 100% the hight is the same for each year. I would like to have them reflect actual count like in the sample.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors