Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I want to calculate the moving average of the last 5 days with values, I have started with this measure but it counts the last 5 Days with no values
I have a table with the result, the problem is that I want to calculate the last 5 days with [AAAA] values so the last row [FirstDayInPeriod] should be 1/4/2022 and not 1/6/2022.
Data | ## FirstDayInPeriod | AAAA | ## Moving average 5 days |
1/4/2022 | 12/31/2021 | 44.98 | |
1/5/2022 | 1/1/2022 | 8.96 | |
1/6/2022 | 1/2/2022 | 61.05 | |
1/7/2022 | 1/3/2022 | 9.77 | |
1/10/2022 | 1/6/2022 | 12.62 | 27.813932 |
Could you help me changing the measure?
THANKS
Solved! Go to Solution.
I have created an improved version,
Hi @rmeng
Please refer to this article from @AlbertoFerrari , it will help a lot https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
Thanks
Joe
If this post helps, then please Accept it as the solution
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |