Forum Discussion
Need Help in Visualization for 13 week moving average
Here is the sample data in pbi.
Sample Data
Could you help with me in this? Appreaciate your time and help in advance!
Best.
YB
That take me to a sign-in page. Also, in the Excel file that you share, show the expected result.
- YweiB3 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.