Trying to understand what is wrong with this formula and why it doesn't give me 2019-2022. Instead, I only get 3 years, 2020-2022. If I change the formula to Prior Year -2 I get 2021-2022. Would appreciate any ideas.
Make sure your "Prior Year" format matches what you're comparing to. In your case you want them to be PERIODS (months).
See if that helps. You can also try converting to the year (period) or Year (Number) since that's what your testing for anyway. you don't really need to use months from what I can tell. Depends on your use case.