Forum Discussion
TOTALYTD Returning BLANK
- 9 years ago
With the TOTALYTD or DATESYTD functions, year-to-date is defined relative to the maximum value of Dates[Date] in the filter context.
If the maximum value of Dates[Date] is in 2025 and you haven't applied any Date filters, and your 'Professional Services Quotes' table doesn't extend to 2025, then TOTALYTD changes the filter on Dates[Date] to the range 1/1/2025-31/12/2025 (assuming you have the complete 2025 calendar year in Dates), which would give you a BLANK result.
Normally these functions are used in the context of days or months within a single year, and will return a YTD value within that year.
With the TOTALYTD or DATESYTD functions, year-to-date is defined relative to the maximum value of Dates[Date] in the filter context.
If the maximum value of Dates[Date] is in 2025 and you haven't applied any Date filters, and your 'Professional Services Quotes' table doesn't extend to 2025, then TOTALYTD changes the filter on Dates[Date] to the range 1/1/2025-31/12/2025 (assuming you have the complete 2025 calendar year in Dates), which would give you a BLANK result.
Normally these functions are used in the context of days or months within a single year, and will return a YTD value within that year.
Great answer. Thank you. Exactly explains why my result was blank too.
My dates table extends many years beyond today... I’m hoping it’s a bit of future proofing.
what syntax do you recommend in that totaltyd function that can use the date table and yet make the results relative to today? ... and I guess not break the function if a page filter removes all future dates and back some months...
- David
- Nischal8 years agoHelper I
but i have set the date with respect to min/max even then i am getting blank ytd