Forum Discussion
Anonymous
6 years agoNot applicable
Previous month calculation
Hi, I'm looking to add a measure to a filter on to my table. I need to get the data to display the previous month and up to 10th of the next. E.g. if my report runs on the 1st April I ne...
az38
6 years agoCommunity Champion
Anonymous
Measure =
var _startDate = DATEADD(MAX(Table[Date]), -2, MONTH)
var _startPeriod = STARTOFMONTH(_startDate)
var _endDate = DATEADD(MAX(Table[Date]), -1, MONTH)
var _endPeriod = STARTOFMONTH(_endDate) + 9
RETURN
CALCULATE(SUM(Table[Value]), DATESBETWEEN(Table[Date], _startPeriod, _endPeriod) )Anonymous
6 years agoNot applicable