There are a few things that could be causing the TOTALYTD function to return a blank result in your case. Here are a few things you can check:
Make sure that the column you are using as the date column in the TOTALYTD function is a date column and that it is formatted correctly. The column should be formatted as a date/time data type, and it should not contain any null or blank values.
Check that your data has a continuous date range for the entire year. TOTALYTD function requires a continuous date range for the entire year to calculate the YTD value.
Check that your data has a granularity of day. TOTALYTD function requires a granularity of day. So, the date column should have day level data.
Check that your data has a complete year of data. TOTALYTD function requires a complete year of data. If your data only has data for a portion of a year, the function will return a blank result.
Make sure that the date column is related to the table that contains the measure you're using in the TOTALYTD function.
If your data includes duplicate date values, the TOTALYTD function might return a blank result. You can use the DISTINCTCOUNT function to check for duplicate date values in your data.
If the above steps don't help, you can try to create a calculated table with the date column, and use this table as the date table in the TOTALYTD function.
If you're still facing the issue, you can provide more details about your data model and the relationship between the tables and the date column, that could help to find the root cause of the problem.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn | Twitter | Blog | YouTube