Forum Discussion
YTD calculation not working properly
- 3 years ago
Hope this video helps:
https://www.youtube.com/watch?v=qJps43vWsWM&list=PLApPcvU5-R26t4dylOnPy8A2-lr4C0C--&index=5
- 3 years ago
That was very helpful! So apparently all that I was missing to make my thing work is to add ".[Date]" to my formula. Tried it and worked like a charm. Thanks!
Hi,
Create a Calendar Table with a relationship (Many to One and Single) from the OrderDate column to the Date column of the Calendar Table. In the Calendar Table, write calculated column formulas to extrat Year, Month name and Month number. Sort the Month name by the Month number. To every visual/filter, drag any date related field only from the Calendar Table. Write these measures:
Measure = SUM(OrderDetail[Sales])
YTD measure = calculate([measure],datesytd(Calendar[Date]),"31/12")
Hope this helps.