Forum Discussion
talderton
3 years agoFrequent Visitor
Stacked 100% bar chart
I would like to calculate the percentage of bar charts for categories. When I use the 'show value as % of grand total' function, it calculates across all the subjects, but I just want it to show the...
Anonymous
3 years agoNot applicable
Hi talderton ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure =
var _sum=
SUMX(
FILTER(ALL('Table'),'Table'[Group1]=MAX('Table'[Group1])),[Value])
return
DIVIDE(
MAX('Table'[Value]) ,_sum)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
talderton
3 years agoFrequent Visitor
Using that DAX formula with my data it becomes:
Measure = var _sum= SUMX( FILTER(ALL('NAPLAN 2023 preliminary'),'NAPLAN 2023 preliminary'[Proficiency_Level]=MAX('NAPLAN 2023 preliminary'[Proficiency_Level])),[NumStud]) return DIVIDE( MAX('NAPLAN 2023 preliminary'[NumStud]) ,_sum)
And I get this result: