Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Accumulate values

I need help with this code:
ACCUMULATE =
CALCULATE([% Cancelados Condicionados Mensal],
filter(ALLSELECTED('Calendário'), 'Calendário'[Date] >= DATE((SELECTEDVALUE('Calendário'[Date])), 01, 01)
&&
'Calendário'[Date] <= max('Calendário'[Date])))
 
I need to calculate the cumulative values depending on the selected date filter. For example, if I choose two months, I want the accumulated value for those two months. If I choose three, the same applies, and so on. However, with this code, the monthly value is correct, but when I make a selection in the filter, only the value for the last selected month appears. Can you help?

1 Reply