Forum Discussion
Anonymous
7 years agoNot applicable
Rolling average on multiple categories
I'm trying to calculate 7 day rolling average. The image shows the result calculated in Excel. Filtering the data using the two slicers would adjust the sum and hence the rolling average. Excel file ...
- 7 years ago
Hi Anonymous,
Try the following measure:
Rolling Average = CALCULATE ( AVERAGEX ( FILTER ( SUMMARIZE ( ALL ( Raw_Data[Date]; Raw_Data[Leads] ); Raw_Data[Date]; "Leads_Sums"; SUM ( Raw_Data[Leads] ) ); Raw_Data[Date] >= MAX ( Raw_Data[Date] ) - 6 && Raw_Data[Date] <= MAX ( Raw_Data[Date] ) ); [Leads_Sums] ) )Should work if you add the categories to your filters or visuals also.
Regards,
MFelix
Ashish_Mathur
7 years agoSuper User
- Anonymous7 years agoNot applicable
Thanks for the effort. Your solution works too, however, it breaks if I use Cat1 or Cat2 in the visual. It keeps working if i use them as filters though.
- Ashish_Mathur7 years agoSuper User
Hi,
Could you show that in a screenshot please?