Forum Discussion
Show Total in Stacked Column Chart with legend
- Anonymous9 years ago
ADC,
Create another three measures in your table, and create Stacked Column chart as shown in the screenshot below.
A = CALCULATE(SUM(Table[docs number]),FILTER(Table,Table[Category]="A"))
B = CALCULATE(SUM(Table[docs number]),FILTER(Table,Table[Category]="B"))
C = CALCULATE(SUM(Table[docs number]),FILTER(Table,Table[Category]="C"))
Regards,
Lydia
ADC,
You can create a measure as follows to calculate the total docs number for each month.
total = CALCULATE(SUM(Table[docs number]),ALLSELECTED(Table[Month]))
However, in stacked column chart, when you drag field to Legend, it is not possible to drag more than one fields to Values. You can switch to use Line and stacked column chart and create the chart as shown in the following screenshot.
Regards,
Lydia
- ADC9 years agoFrequent Visitor
Lydia,
Thanks a lot for your answer.
It is a nice workaround and I get the total sum shown in the graphic that way.
However, I was wandering if the total sum of the categories can be shown in each column, on top of the column.
I need that very frequently and the Line sometimes generates confusion on the audience.
Any other way to handle it?
Thanks again.
Regards.
Alejandro
- Anonymous9 years agoNot applicable
ADC,
Create another three measures in your table, and create Stacked Column chart as shown in the screenshot below.
A = CALCULATE(SUM(Table[docs number]),FILTER(Table,Table[Category]="A"))
B = CALCULATE(SUM(Table[docs number]),FILTER(Table,Table[Category]="B"))
C = CALCULATE(SUM(Table[docs number]),FILTER(Table,Table[Category]="C"))
Regards,
Lydia- Anonymous7 years agoNot applicable
Filters are not working for indvidual category it select whole x axis as filter.