Forum Discussion
mlavey24
7 years agoFrequent Visitor
Error using the 'DAY' interval in my PARALLELPERIOD() function
I am currently trying to create a measure that calculates yesterday's sales amount, relative to any date I pass through my Date slicer. The syntax reads as follows:
Yesterday's Sales =
CALCULATE (
[Sales],
PARALLELPERIOD ( 'Calendar'[Date], -1, DAY )
)
When I complete this measure and save my work, I am presented the following error message:
"A 'DAY' interval type was specified in the call to function 'PARALLELPERIOD'. This is not supported."
Any idea why this is or how I can resolve it? Thank you.
I figured this out. I just replaced PARALLELPERIOD with DATEADD and the measure calculated properly. I'm still interested in why DAY cannt be used as an interval but effectively, it doesn't matter for this exercise.
1 Reply
- mlavey24Frequent Visitor
I figured this out. I just replaced PARALLELPERIOD with DATEADD and the measure calculated properly. I'm still interested in why DAY cannt be used as an interval but effectively, it doesn't matter for this exercise.