1. Create a new set from your date field by right clicking on it and clicking 'Create Set'. Name it something like "TodayOr1YrAgoToday"
Go to the 'Condition' tab and select 'By Formula'. Enter the folllowing formula (changing the date field to your date field name): [Order Date]==TODAY() OR [Order Date] == DATEADD('year',-1,TODAY())
Note that you don't have to create a set, you could use this formula to filter individual dates by placing it in the Condition tab in the filter on your date field. A set is just easier to re-use.
2. Drag this set onto the filters shelf.
3. Drag your date field onto the columns shelf.
4. Add the 'Measure Names' to the filter shelf and select the measure names you want to include (Actual Sales, Target Sales and Total Inventory for example).
5. Drag 'Measure Names' from the Dimensions onto the Columns shelf after the Date field.
6. Drag the 'Measure Values' from the Measures onto the Rows shelf.
7. Drag the 'Measure Names' onto Color in the Marks Shelf.
I've attached a workbook that uses the Tableau Sample data and does the above.
-- Modified: Added Sample Workbook. Improved Instructions.
YrAgoAnalysis.twbx.zip 930.1 KB
Thanks a lot! I'll try this one I think it's the best solution for my problem!!!
Thanks a lot again, Elizabeth.