Forum Discussion
Dynamic Rolling Average & Sum based on Slicer Selection
- 4 years ago
jovendeluna21 , With help from the date table, measures like example measure should help
Rolling 30 = calculate(AverageX(Values('Date'[Date]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-30,DAY))
tried this one but giving me incorrect number
jovendeluna21 , For Days Avg
Rolling N = calculate(AverageX(Values('Date'[Date]),CALCULATE(sum('AVE PAYMENT TERMS RAW DATA'[TOTAL_SPEND]))),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-1* [Parameter Value],MONTH))
For Months Avg// Sum till month Avg post that
Rolling N = calculate(AverageX(Values('Date'[Month Year]),CALCULATE(sum('AVE PAYMENT TERMS RAW DATA'[TOTAL_SPEND]))),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-1* [Parameter Value],MONTH))
- jovendeluna214 years ago
Helper IV
Still wrong, actually the numbers I have are already correct using my previous DAX measures, it's just that when I use other slicers the numbers do not change, which should be.