Forum Discussion
Previous YTD Help
Hi BI Community,
I am trying to make a drillable matrix and visuals that show the current progress compared to last years progress. My formula is:
Previous YTD = CALCULATE(TOTALYTD([total sales],vw_DimDate[Date]),SAMEPERIODLASTYEAR(vw_DimDate[Date])).
I know that it looks like it could be more simple, but due to difficulties this is what we are working with. It works great if I want to look at the total YTD, but I cannot view indivudual months. Is there something I can do with the datesinperiod function? Can you guys please help. I want to be able to use the date slider so I can compare any current period of time with the same period of time last year.
-Mike
In your scenario, to see the indivual month data, you should create a YearMonth column first, then build a hierarchy like "Year->YearMonth->Date". Your Previous YTD will return correct result.
Regards,
2 Replies
- v-sihou-msftMicrosoft Employee
In your scenario, to see the indivual month data, you should create a YearMonth column first, then build a hierarchy like "Year->YearMonth->Date". Your Previous YTD will return correct result.
Regards,
- bigspikemikeRegular Visitor
Ok, I made a hierarchy and included previousyear and that did the trick