Forum Discussion
Moving average measure with sum
Thank you both for replying.
Yes v-huizhn-msft Angelica, you are correct about the assumption of what I want to get from the calculation.
But I also want the average of the last month (or 30 days) as a moving average.
I am trying to replicate the excel function in chart tools, where I can put in a "Two period moving average".
My data is too fluctuating to just make an average of the last few days - I need to follow it on a greater period.
Maybe I am going about it all wrong, but I (and my boss) love that function in Excel, and I would like to know how to put it in my Power BI dashboard :)
Again, I am new to making formulas/code to get what I want.
Thank you.
Hi DavidB,
For 2017-01-01, you don't want to get (10+34+20)/3, you need to the past month's(2016/12/1-2016/12/31) average? But there is no past month's data. Could you please create some fake sample table, and list the desired result, so that we can post solution which is close to your needs. Thanks for understanding.
Best Regards,
Aneglia
- DavidB9 years agoFrequent Visitor
Hello v-huizhn-msft
Thank you for taking your time to help. I understand what you mean, but there will always be a starting point in the dates, that do not have a previous month. What Excel does, is just not make a trendline before a full set of one month data is present, so it looks like this:
So if I have a dataset consisting over 6 months, the moving average will be present on the previous 5 months.
If you still want a fake sample table, I can certainly make that.
- DavidB9 years agoFrequent Visitor
v-huizhn-msft
I have made an Excel with a sample dataset:
https://1drv.ms/x/s!AibXCp666x1T0wnjjVPzX_0LdwSt- DavidB9 years agoFrequent Visitor
Bump
(don't know if this is allowed) :)Edit: To sum it up. I wan't to make the moving average of the sum of the dates - disregarding the fruit (column B).