If MonthFiled is a date you will have a problem comparing the value with max in set analysis. This is due to that max() will return the integer form of the date (45324) while the comparison is made with the text 2021-02-13. You need to change the value to date after the max.