Forum Discussion
YTD Function
Hi Anonymous
I tried to build a proper calendar table and here is my latest table.
I used the following functions and by pulling Year on top and Month below in the field, i managed to view some data. However, i noticed that if i pull FY21 into a card visual, it showed blank but i can see numbers for FY22. When i looked at the table, it might be due to the 'total' value is missing in FY21. Do you know what is causing that? both years are using the same formula...
Appreciate your advise! thank you!!
With TOTALYTD and DATESYTD functions, year-to-date is defined relative to the maximum value of Dates[Date] in the filter context. Since in the filter context of 'total' of FY21 table the maximum year is FY22, TOTALYTD() changed the filter on the calender table to the range of FY22 ie, 1st Feb 2022 - 31st Jan 2023 for which the measure '[Actual FY21]' may not have the values and thus returned blank. Similarly for the card visual, in the filter context, the maximum year is FY22 and '[Actual FY21]' may not have values in that range hence the card is also blank. This is what I think is happening.
Regards,
Aditya
- Anonymous5 years agoNot applicable
Hi Anonymous
Thanks for your advise!
In this case, how do I change the formula for FY21 to show the YTD total value in card visual?
Thank you!