Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to create a rolling 6 week view of a count.
It should be simple - an aggregate of weekly totals for the last 6 weeks of daily data. Put into a line graph.
I am following this guide:
http://www.powerpivotpro.com/2013/07/moving-averages-sums-etc/
But running into an error when I try select the number of intervals as below:
Any ideas as to why?
I realise it says day in my example. I was testing it on a day to day moving visual before creating the 6 week. I also see that PowerBI does not have a week option, any help in creating that would be appreciated too.
Solved! Go to Solution.
Hi @fyrworx,
Please modify your DAX formula as:
3 Month Moving Sum Units Sold = CALCULATE ( SUM ( 'Moving Average'[Compliant] ), ALL ( 'Moving Average' ), DATESINPERIOD ( Dates[Date], LASTDATE ( Dates[Date] ), -3, DAY ) )
Thanks,
Yuliana Gu
I seem to have figured out the error but can't get the visual to work the way I want it.
Apparently the syntax requires a space after the number of intervals, before the ",".
Which doesn't make sense. Anyone else have this issue?
Hi @fyrworx,
Please modify your DAX formula as:
3 Month Moving Sum Units Sold = CALCULATE ( SUM ( 'Moving Average'[Compliant] ), ALL ( 'Moving Average' ), DATESINPERIOD ( Dates[Date], LASTDATE ( Dates[Date] ), -3, DAY ) )
Thanks,
Yuliana Gu
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
93 | |
50 | |
49 | |
46 |