Forum Discussion
Rolling 12 months average
Hello,
I sued a "quick measure" to colculate the rolling 12 months average, but it does not look quite right and goes into the future months for some reason. Can some please help me?
p.s. I have a Date Hierarhy applied on my "Date" column.
7 Replies
- tackytechtom
Most Valuable Professional
Hi AndreOlha
Does it work with something like this?
MovingAverage = CALCULATE ( AVERAGE ( Table[GJ] ), DATESINPERIOD ( 'Table'[Year - Month], STARTOFMONTH ( LASTDATE ( 'Table'[Year - Month] ) ), -12, MONTH ) )
Let me know if this helps! Feel free to share your file, if the above does not work and I am happy to support you!/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- AndreOlhaFrequent Visitor
The movement that is shown below is the right one with respect to the data points and the rolling average (old formula used) but the problem here is the yellow area which shows future project months.
- tackytechtom
Most Valuable Professional
Hi AndreOlha ,
Now, I had time to look into it.
Try the previously suggested solution (Note, it should be STARTOFMONTH and not EOMONTH in the formular), and then you select the following settings in your graph:
Does this solve the issue? 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
- AndreOlhaFrequent Visitor
Hello tackytechtom thank you so much for your reply and help!
I plugged in your formal and it solved the problem with showing the future months, however the rolling average it is equivalent to my data values (please see the screenshot for more detail).
My data values are shown as "average" so it might have to do something with, right? It was my another issu I did not how to show my data value no agrregated ot averaged just as it is. All of my data value columns are categorized as "Whole numbers" and "Nor summarized".
Hope I am making some sense 🙂
Thank you for the help.
- Ashish_Mathur
Super User
Hi,
Ensure that you have a Calendar Table with calculated column formulas for Year, Month name and Month number. Sort the Month name by the Month number. Create a relationship (Many to One and Single) from the Date column in your Data Table to the Date column in the Calendar Table. To your visual, drag Year and Month name to the X axis. To get help with the mesures, share the download link of your PBI file.
- AndreOlhaFrequent Visitor
Hello Ashish_Mathur thanks a lot for your response. I will defininately need some help with the provided intructions, howver I can't share the publush the link through PBI due to the security issues. Would it be possible to email the file by any chance?
Thanks,
Olha
- Ashish_Mathur
Super User
I cannot share my e-mail address. Upload the file to Google drive/One Drive and share the download link here.