Forum Discussion

kageyoshi777's avatar
kageyoshi777
Frequent Visitor
3 years ago
Solved

Measure for current month based on slicer settings.

Measure = var _min = eomonth(today(),-1)+1 var _max = eomonth(today(),0) //today() return CALCULATE([#SUM_ALL], FILTER(ALL('Date'),'Date'[Date]>= _min && 'Date'[Date] <=_max ))

 

I would like to add time slicer (type before) with a date column.

So basically if I will select in the slicer 15th august I will get a Measure aggregated to whole month august.

How Can I do this?

  • Hi,

    Try this measure

    Measure = CALCULATE([#SUM_ALL],datesbetween('Date'[Date],eomonth(selectedvalue('Date'[Date],-1)+1,eomonth(selectedvalue('Date'[Date],0)))

    Hope this helps.

3 Replies