Forum Discussion
YweiB
3 years agoFrequent Visitor
Need Help in Visualization for 13 week moving average
Hi all, Currently I have a list of sales data from 1/7/2019 to 6/19/2023. I used window function to calculate the rolling 13 week average for this sales data. Here is the function of Rolling ave...
Ashish_Mathur
3 years agoSuper User
That take me to a sign-in page. Also, in the Excel file that you share, show the expected result.
YweiB
3 years agoFrequent Visitor
So sorry for the confusion.
Here is the google drive link, I uploaded the pbi file and excel data in here.
The expected chart is in pbi file.
Thank you so much! Appreciate for your time!
YB
- Ashish_Mathur3 years agoSuper User
Hi,
In your post dated June 23, you showed a Date column but in the Excel file that you have shared, there is no date column and therefore i am confused. I will just share the DAX pattern with you.
- Create a Calendar Table with
- Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table
- To your visual, drag Date to the X-axis
- Write this measure
13 weeks moving average = averagex(calculatetable(values(calendar[date]),datesbetween(calendar[date],min(calendar[date])-84,max(calendar[date]))),[Total sales])
Hope this helps.