Forum Discussion
Query on rolling moving average
- 3 years ago
I tried rolling average from quick measure and it worked well but I am having data after the current year and need solution to stop rolling average to current month.
Hi Vinod_P
It seems your current Yard column doesn't return the correct date difference result, right? If I understand it correctly, you may try the following DAX for the Yard column.
Yard =
IF (
'N3M Curr'[Prep Start Date] <> BLANK ()
&& 'N3M Curr'[Ref Date] <> BLANK ()
&& 'N3M Curr'[Prep Start Date].[Date] > 'N3M Curr'[Ref Date].[Date],
'N3M Curr'[Prep Start Date].[Date] - 'N3M Curr'[Ref Date].[Date],
0
)
If it doesn't work, can you provide some sample data and expected result in table format? And for the rolling moving average, it should roll by what and calculate the average in which moving period? Using some sample data will help us understand it better. How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.