# Measure missing Total

Hi,

recently I’ve got some great measure on the Forum that helps me to solve really big problem I had.
But from some reason I don’t see total in a matrix I use to present data.

Measure:
VAR _season= SELECTEDVALUE(Figures[Season_Mark])
VAR _yr=SELECTEDVALUE(Figures[Season_Year])-1
VAr _qu=[# Quantity CY]
VAR _seasonkark=if(ISBLANK(_qu),BLANK(),_season&_yr)
VAR _tot=CALCULATE([# Quantity CY],FILTER(ALL(Figures),Figures[Season]=_seasonkark), DATEADD( Dates[Date] , -1 , YEAR ) )
return
_tot>

Is there any way to bring back Total in the matrix?

Season LY V.2.pbix (156.3 KB)

Hi @sassaboss - Can you try this measure.

VAR _season= SELECTEDVALUE(Figures[Season_Mark])
VAR _yr=SELECTEDVALUE(Figures[Season_Year])-1
VAR _qu=[# Quantity CY]
VAR _seasonkark =
SWITCH( TRUE() ,
_season = “CONT”, “CONT9999”,
_season&_yr
)
VAR _tot =
IF( ISBLANK([# Quantity CY]), BLANK(),
CALCULATE([# Quantity CY], FILTER( ALL(Figures[Season]), Figures[Season] =_seasonkark), DATEADD( Dates[Date] , -364 , DAY ) )
)

return
if(ISFILTERED(Figures[Season]),_tot,[# Quantity LY])

Season LY V.2.pbix (156.6 KB)

Thanks
Ankit J

1 Like

What a elegant solution
Works great!

Many thanks for help.

Regards,
Sasa