Forum Discussion
Rolling average ignore blank values
Hi everyone,
I have a calculated column which returns the rolling average percentage of the last five times (based on the order of the index).
However, sometimes there is a blank row, which will filled later. So, the index already has a value, but all other rows are blank.
In the image, you see that Index 11 is empty. However, the percentage for Index 12 isn't the same. This doesn't make sense, because the column Percentage profit/loss is 3,27%, but the column Percentage Rolling Avg decreases (from -0,72% to -0,97%)
I would like that Index 11 should be ignored, so that the percentage for Index 12 is the same as Index 10 (-0,72%).
The formula for the calculated column is as follows:
Thanks in advance!
2 Replies
- v-xiaosun-msft
Community Support
Hi Anonymous ,
According to your calculation logic, when the index is 10, it is the average of row "6, 7, 8, 9, 10". When the index is 12, it is the average of row "12, 10, 9, 8, 7" which is not the same as row 10. And it does ignore blank values.
Could you please describe your calculation logic more clearly in order that we can help you better?
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi v-xiaosun-msft , thanks for your reply!
At this moment, when there is a blank, the average is based on 4 values instead of 5 values.
The Percentage Rolling Avg of Index 12 is based on index 12, 11 (blank), 10, 9 and 8. I would like that this blank is ignored, and that the average is based on 12, 10, 9, 8 and 7.
I have added a link with a small data set. In this data set the solution is included to make it more clear. I hope that helps 🙂