you can do this with a if-condition within one variable:
something like:
if date = date1 than ‘this_year’ else if date = date2 then ‘previous_year’
–> so you can set or filter your columns on the text-content of that variable
or you can do this with two variables:
something like:
rev_this_year: if date = date1 than [revenue]
rev_prev_year: if date = date2 than [revenue]
–> so you can insert these variables directly into your columns