Forum Discussion
jovendeluna21
Helper IV
4 years agoDynamic Rolling Average & Sum based on Slicer Selection
Hello, Any idea on how a dynamic rolling average and spend be dynamic based on slicers? I just noticed that the numbers do not change when I use different slicers such as World Area, Commodity, et...
- 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))
jovendeluna21
Helper IV
4 years agotried this one but giving me incorrect number
Rolling N = calculate(AverageX(Values('Date'[Date]),CALCULATE(sum('AVE PAYMENT TERMS RAW DATA'[TOTAL_SPEND]))),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-[Parameter Value],MONTH))
amitchandak
Super User
4 years agojovendeluna21 , 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))