Hello,
I am trying to calculate the YTD variance for my sample table shown below.
Table Name is "Project Costs"
I want to calculate YTD variance for this table
The formula is YTD variance = (Current month Variance) - (December month's variance of last year)
I used the below DAX calculation
YTD_Variance = SUM('Project Costs'[Variance]) - CALCULATE(SUM('Project Costs'[Variance]), PREVIOUSMONTH('Date'[Date]))
This calculation works for January 2018 month, but for February 2018 it is showing wrong calculation as shown below.
Please help me correct DAX calculation
PS: I have the date dimension included.
Thanks
Bhavesh