Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic lastdecember results.
Hello everyone,
I'm working on a dax that measures the results of Lastdecember revenue by selecting the year. My dax formula is :
A = CALCULATE(CALCULATE([Total Non-Quality],LASTDATE('Calendar'[Year/Month])),PARALLELPERIOD('Calendar'[Year/Month],-1,YEAR))
when I apply this formula I obtain these results by filtering on sites: Last December results = 14.98 (of 2018) for one site and the global is 27.81 (of 2018)
When I change this formula to select Last December revenue for each year it doesn't work especially when I filter by sites. So the formula that I used is :
B = CALCULATE([Total Non-Quality],FILTER(ALL('Quality 12MR'),YEAR('Quality 12MR'[Date])=SELECTEDVALUE('Calendar'[Year/Month].[Year])-1 && MONTH('Quality 12MR'[Date])=12))
the results that I obtain are Last December results = 27.81 (of 2018) for one site and the global is 27.81 (of 2018) when I don't apply site as a filter, so it doesn't filter by site.
Thank you for the response.
Best regards.
- Anonymous6 years ago
1 Reply
- AnonymousNot applicable