Forum Discussion
DATESYTD doesn't work
- 5 years ago
What context and visuals are you using this in?
You can either
OPTION A: update your formula to use manual reference to TODAY(), such as:
YTD = CALCULATE ( [New Fulfillment Rate2], YEAR(FactTable[Date]) = YEAR(TODAY()))or, OPTION B: add a year context to your report by putting a date filter on the page that has 2020 as the max year.
Hi, jamuka
It’s my pleasure to answer for you.
According to your description, It's not vey clear where problems occur, but you can try to do it without time intelligence function.
Like this:
YTD =
VAR d =
MAX ( 'Date'[Date] )
RETURN
CALCULATE (
[New Fulfillment Rate2],
FILTER (
ALL ( 'Fullfilment Report' ),
YEAR ( [Delivery Date] ) = YEAR ( d )
&& [Delivery Date] <= d
)
)If it doesn’t solve your problem, please add more information and feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jamuka5 years agoHelper IV
Hello Janey,
sorry for late reply. thanks to Allison I solved my problem.
My calendar table has date entries for 2021 (due to delivery dates) and I calculated YTD based on delivery date therefore my YTD measure returns blank values. I add year filter to my measure (which will show current year) and it works.
With your fomula it shows same value for every entry in my matrix table.
regards