Forum Discussion
Previous Quarters SUM
Hi folks,
I have managed to create a measure to calculate the last quarter invoice amount see below and all works well:
Thanks
Anonymous ,
Rolling 4 qtr = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-4,Quarter))
Rolling 4 qtr before 1=
var _max1 = MAX( 'Date'[Date])
var _max = eomonth(_max1,-1* if( mod(Month(_max1),3) =0,3,Month(_max1)))return
CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],_max,-4,Quarter))
1 Reply
- amitchandakSuper User
Anonymous ,
Rolling 4 qtr = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-4,Quarter))
Rolling 4 qtr before 1=
var _max1 = MAX( 'Date'[Date])
var _max = eomonth(_max1,-1* if( mod(Month(_max1),3) =0,3,Month(_max1)))return
CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],_max,-4,Quarter))