Forum Discussion
JoeAPH
7 years agoRegular Visitor
Introducing Month field from Calendar changes YTD calculation
I have a measure Sales YTD = CALCULATE([Ttl Sales], FILTER(trans,year(trans[DATE])=MAX(Calendar2[Year])), FILTER(trans,trans[Hold?]="n")) Note: Ttl Sales = Sum(trans[NetSales]) I...
- 7 years ago
Hi
I added the RETURN command, and it is working perfectly!
Many thanks
Joe
JoeAPH
7 years agoRegular Visitor
Hi
Thank you for your explanation of the error and formula suggestion.
I'm getting this error:
The syntax for 'CALCULATE' is incorrect. (DAX(var max_year = CALCULATE(MAX(Calendar2[Year]), ALL(Calendar2))CALCULATE([Ttl Sales],FILTER(trans,year(trans[DATE])=max_year),FILTER(trans,trans[Hold?]="n")))).
Any ideas?
JoeAPH
7 years agoRegular Visitor
Hi
I added the RETURN command, and it is working perfectly!
Many thanks
Joe