Forum Discussion
Timeline Slicer + YTD Measure
- 6 years ago
Anonymous ,
Please refer to this file, if this can help. Check the calculation of LYTD, LYD2 vs others
What is the calculation you are using? Are you using SAMEPERIODLASTYEAR?
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008
Hi
I am using the SAMEPERIODYEAR, but I think the problem is the Time Slicer that even if I select from January to April it takes me the whole year.
If I select from January to March the values in the table are correct:
But when I select from January to April it takes me the whole year and that's the problem I have.
Thanks
- amitchandak6 years ago
Super User
Anonymous ,
Not tested. try like
Last YTD Sales = = var _max =date(year(today())-1,month(today()),day(today())) return CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]),'Date'[Date]<=_max)- Anonymous6 years agoNot applicable
Hi amitchandak
The problem in this way is that if a particular month was selected (example only February) it does not accumulate the value of January, because it does not have the YTD.
Slicer selects me every month from January to December even if I have a filter that shows me only the months that have values.
And in this particular case they ask me to see all the measurements in YTD and they want to see that slicer.Thanks!
- amitchandak6 years ago
Super User
Anonymous , I suggested a couple of solutions. In case it still does not help.Can you share sample data and sample output.