How to show the report date in the mom/yoy comparison page

I followed this post to create the date comparison table. Instead of showing this month/ this year, is there a way that we can automate to let the column to show the real date, like 2022 Oct(this month)/ 2022(this year)?

The only way I could think would be to use parameters and set dynamic default values.

image