Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216047

YTD and Date Tables

$
0
0

Hi!

 

I am trying to do what I thought would be a fairly simple YTD measure for variance to budget (Actual minus Budget).

 

My measure is defined as

 

NWS VTB $ YTD = TOTALYTD( SUM( PPG[Actual] ) - SUM( PPG[Budget] ) , 'Time Map'[FiscalDate] , "06/01/2017" )

 

TimeMap is my date table, and Fiscal Date is in MM/dd/YYYY.  The FY ends on 06/01/2017.  Because our business always talks about Fiscal Months in a different format ( June of FY17 is written as FY2017-P01), in my TimeMap for every Fiscal Date there is a corresponding 'Fiscal Month'.  Snapshot below.

 

Capture.JPG

In my report I want to graph the variance to budget YTD by FiscalMonth (not FiscalDate).  Sadly, for each month I just get the monthly variance.  Also, if I try to display the variance in a Card with a FiscalMonth slicer, the YTD only works if I sequentially select the months.  Changing to FiscalDate doesn't help either.

 

Example: Month 1 is -10, and Month 2 is +5.  Month 2 YTD should be -5.  If I select Month 2 alone in the slicer, I get +5.  If I select both Months 1 & 2 I get the correct -5. 

 

How can I fix my DAX or model so each month correctly returns the YTD?  Thanks so much!

 

 

 


Viewing all articles
Browse latest Browse all 216047

Trending Articles



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