The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
I am trying to show % of total together with actual total in the stacked column like so:
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%).
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 ()
@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
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.