Forum Discussion
Anonymous
6 years agoNot applicable
Sum till selected month
Hey there,
I want to calculate the total amount till the selected month in the slicer. I´ll show the result in a card.
Anonymous , No clear Try like
Till Date = VAR _max = MAXX(Allselected('Calendar'), 'Calendar'[DATE] ) return CALCULATE ( SUM ( Sales[amount] ), FILTER ( all('Calendar'),'Calendar'[DATE] <=_max), )
3 Replies
- amitchandak
Super User
Anonymous , No clear Try like
Till Date = VAR _max = MAXX(Allselected('Calendar'), 'Calendar'[DATE] ) return CALCULATE ( SUM ( Sales[amount] ), FILTER ( all('Calendar'),'Calendar'[DATE] <=_max), )- AnonymousNot applicable
It works perfectly, it was what I looking for. Thank you.
- ryan_mayu
Super User
Anonymous
Please see the DAX below.
Measure = VAR maxdate=max('Table'[date]) return CALCULATE(sum('Table'[value]),FILTER('Table','Table'[date]<=maxdate))Hope this is helpful