Forum Discussion
YTD-1
Hello.
I'm having difficulties visualising my YTD for this year and YTD for last year measures.
As you can see from the chart, the YTD-1 goes on until dec 31st, however, I want it to end at the same time as the YTD line. The YTD line stops at the last date with sales numbers.
The DAX I've used for YTD is :
And for YTD -1 I've used:
3 Replies
- VahidDM
Super User
Hi Anonymous
Try this:
YTD -1 = CALCULATE([YTD],SAMEPERIODLASTYEAR(Dates[Date]),Dates[Date]<=MAX(Sheet1[Date]))Output=My data:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
- AnonymousNot applicable
Hello VahidDM. Thanks for the tip, however, I'm still unable to make it work.
Here's how it looks:
I have no idea where it's going wrong and it's really frustrating.- VahidDM
Super User
Hi Anonymous
Is there any relation between your Date and Value tables? Can you share a sample of your data or share your PBIX file? [after removing sensetive data]
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!