Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 62196

How to calculate YTD savings from the given table

$
0
0

Hello,

 

I am trying to calculate the YTD variance for my sample table shown below. 

Table Name is "Project Costs" 

 

Capture.PNG

 

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.

 

Ca2pture.PNG

Please help me correct DAX calculation 

 

PS: I have the date dimension included. 

 

Thanks

Bhavesh

 

 


Viewing all articles
Browse latest Browse all 62196

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>