Forum Discussion
fyrworx
9 years agoFrequent Visitor
DATEINPERIOD issues
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 gui...
- 9 years ago
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
fyrworx
9 years agoFrequent Visitor
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?
- v-yulgu-msft9 years agoMicrosoft Employee
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