Forum Discussion
Anonymous
6 years agoNot applicable
Timeline Slicer + YTD Measure
Hello, everybody! I am using the Timeline Slicer in the months and I am having a problem in the current year (2020). I have filtered the display to only show me the months that have values, that's ...
- 6 years ago
Anonymous ,
Please refer to this file, if this can help. Check the calculation of LYTD, LYD2 vs others
amitchandak
Super User
6 years agoAnonymous , try like
YTD Sales =
var _max =today()
return
CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31"),'Date'[Date]<=_max)
Last YTD Sales = =
var _max =date(year(today())-1,month(today()),day(today()))
return
CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"),'Date'[Date]<=_max)