Forum Discussion
Critical and Urgent! Need help Rolling average calculation
- Anonymous8 years ago
Thanks for the update Dale. Somehow, this doesn't work for my data as slicer selection should not affect this data. I have worked on a different solution by summarizing my actual table into a new table. But this explanation given by you has given me a better idea towards calculation.
Thank you :)
Hi Nishanth.,
I guess your data looks like this:
So, the last four columns are necessary. This mode needs a date table that will provide all date attributes. We need to unpivot these data to make it easy to handle. Please check out the demo here.
Create a measure like this:
avg_last3months =
CALCULATE (
AVERAGE ( Table1[Value] ),
DATESINPERIOD ( 'Calenar'[Date], MAX ( 'Calenar'[Date] ), -3, MONTH ),
ALL ( Table1[Attribute] )
)Best Regards,
Dale
Thanks for the update Dale. Somehow, this doesn't work for my data as slicer selection should not affect this data. I have worked on a different solution by summarizing my actual table into a new table. But this explanation given by you has given me a better idea towards calculation.
Thank you :)