MarkCBB
Active Member
- Joined
- Apr 12, 2010
- Messages
- 497
Hi there,
I have the below DAX function that needs to calculate SUM of the Values from Last Year to Date, however I am apparently using LASTDATE Incorrectly in the DAX Function.
The Below code is the one with the Error.
This code works however it is not what I want as the Today is not correct in the way out data is collected.
I need to adjust the first DAC Function to take the month of the latest Date.
I have the below DAX function that needs to calculate SUM of the Values from Last Year to Date, however I am apparently using LASTDATE Incorrectly in the DAX Function.
The Below code is the one with the Error.
Code:
LYTD Rands = CALCULATE(SUM(MASTER_SALES[VALUE]),MASTER_SALES[YEAR]=YEAR(TODAY())-1,MASTER_SALES[MONTH]<=MONTH(LASTDATE(MASTER_SALES[DATE])))
This code works however it is not what I want as the Today is not correct in the way out data is collected.
Code:
LYTD Rands = CALCULATE(SUM(MASTER_SALES[VALUE]),MASTER_SALES[YEAR]=YEAR(TODAY())-1,MASTER_SALES[MONTH]<=MONTH(TODAY()))
I need to adjust the first DAC Function to take the month of the latest Date.