Forum Discussion
DJOXXXA
Helper I
7 years agoCalculate YTD value with Week slicer
Hi all, I have a small question regarding YTD and MTD calculation with filters for weeks in Power BI: I want to create a card which will show this years YTD vs last years YTD as a percentage, b...
- 7 years ago
Hi all,
Turns out, I was using the correct formulas, but my Date column in my Calendar was not Marked as Date Table, and that was causing this issue.
Mariusz
Community Champion
7 years agoHi DJOXXXA
Try this.
Sales Year To Date =
CALCULATE(
[Sales],
DATESYTD( 'Calendar'[Date] )
)
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.

Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
DJOXXXA
Helper I
7 years agoDear Mariusz,
Thank you for your reply! I have this formula set up already, but it is not working properly. As you can see, first picture represents the table without any slicers:
And this picture represents the same table with slicer for week: (as you can see, PBI recalculates YTD measure from the first date in the selected week, not from the January 1st)
- DJOXXXA7 years ago
Helper I
Hi all,
Turns out, I was using the correct formulas, but my Date column in my Calendar was not Marked as Date Table, and that was causing this issue.