Welcome to the forums Eric. Tableau doesn't use variables per se, instead we use formulas in calculated fields to create stuff. The formula for what is sounds like you're wanting is:
DATEADD('day', -1, TODAY() )
That will return yesterdays date.
My challenge is that I need to produce a measure for each of the past 24 months (i.e. each period needs to be calculated based on a column date).
I am not cerrtain how to build a single calculated field where datediff('month) <= Today and datediff('month) >= 24 will pull dynamic data...
I guess I could setup 24 separate calc fields?
Thanks in advance!
Eric it really doesn't sound like you're using Tableau to the best advantage. Could you post a bit of sample data, or better yet a packaged (twbx) workbook that shows what you're attempting to create, as close as you can. Or you could use the Superstore dataset to create something.
You can use the [date] field in a calculation, just like any other field. You should be able to write one calculation to handle all possible time periods, I'd think.
We can't really know without seeing your actual workbook, or some sample data.