have a look if the date hide can solve it for you : https://democentral.learnquicksight.online/#Dashboard-TipsAndTricks-Calculation-Year-over-Year-Table-with-Filtering-aka-Date-Hider-
else, post a sample data example in the Arena and expected output , [ QuickSight Arena -- An embedded instance of QuickSight within the QuickSight Community ] for others to help in finding a solution.
Kind regards,
Koushik