Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Total year-to-date calculation

Hi guys,

 

I'm looking for a way to create a measure that calculated a "running" YTD value.

 

I've got a "date" field with fiscal years (18/19, 19/20, 20/21) and a "sales". I have created a 18/19 YTD sales by using the following command:

 

18/19YTD = CALCULATE(SUM(Sales[TotalSales]),DATESBETWEEN(Sales[Date.Date],"7/1/2018",DATE(YEAR(NOW())-2,MONTH(NOW()),DAY(NOW()))))
 
However, I would very much like one measure that is a running YTD, so that YTD sales for both 18/19, 19/20 and 20/21 is within the same measure.
 
Is that possible?

6 Replies