what would be the formula for referring Previous year value in current year ?

edited August 2023 in Modeling

For example, I want to refer the value of last year july 2022 in current month July 23. the line item is Past year revenue where I just want to show same month revenue from previous year, how could I achieve that?