The best would if you could do the unpivoting in database / query level. You should have a date dimension table joined with case-whens to your extracted data. Is it possible to use a date dimension table in your case? What database is used? Maybe when can help you how to transform the query.
However, if you have a date dimension and your values in a SQL92 compliant server, then something like:
WHEN d.date = sysdate() - INTERVAL '1 MONTH' THEN XYZ-1
WHEN d.date = sysdate() - INTERVAL '2 MONTH' THEN XYZ-2
FROM you_extracted_date e
CROSS JOIN date_dimension d
WHERE d.date in (sysdate()- INTERVAL '2 MONTH', sysdate() - INTERVAL '1 MONTH')
Anyway, you can build the same query with tableau filters.
Thanks for that reply. Temporarily, I used some different date fields stored in my Excel source data, but I think for a 'correct' solution, I need to go the route you suggested.