Forum Discussion
How to Calculate Total Column When is Not Displaying the Total
Hi guys,
When I went to the paint roller turn on the Total somehow it doesn't show me the total.
I want the total amount of the entire column. How can I write a formula or do I need to create a new measure.
Plan Start2 = SWITCH(TRUE(),
MAX(MonthTable[Month]) = "April",CALCULATE(
COUNT(DATA[ID]),FILTER(DATA,[Plan Month]="April"
&& [Plan Year] = "2018"
&& [Data] = "March")),
MAX(MonthTable[Month]) = "May", CALCULATE(
COUNT(DATA[ID]),FILTER(DATA,[Plan Month]="May"
&& [Plan Year] = "2018"
&& [Data] = "April")),
MAX ( MonthTable[month] ) = "June", CALCULATE (
COUNT ( DATA[ID] ),
FILTER (
DATA,
[Plan Month]= "June"
&& [Plan Year] = "2018"
&& [Data] = "May"))
)
Thanks all :)
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
What is going on is that since in the context of ALL your max month is December no statement in your SWITCH statement is true.
The basic fix to this is to keep your existing measure and create one like this:
Plan Start2 Total = VAR __table = SUMMARIZE(MonthTable,[Month],"__value",[Plan Start2]) RETURN IF(HASONEVALUE(MonthTable[Month]),[Plan Start2],SUMX(__table,[_value]))
Use this measure instead of your Plan Start2 measure in your visual.
2 Replies
- Greg_Deckler
Community Champion
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
What is going on is that since in the context of ALL your max month is December no statement in your SWITCH statement is true.
The basic fix to this is to keep your existing measure and create one like this:
Plan Start2 Total = VAR __table = SUMMARIZE(MonthTable,[Month],"__value",[Plan Start2]) RETURN IF(HASONEVALUE(MonthTable[Month]),[Plan Start2],SUMX(__table,[_value]))
Use this measure instead of your Plan Start2 measure in your visual.
- Stuznet
Helper V
Thank you so much :)