A possible way to solve this would be to put a Date Field on the Filter shelf that sets all dates to a similar year. You can do this using a Calculated Field similar to the one below.
- This Calculated Field parses out the different date parts of the date field into strings, adds them together with the appropriate dash marks, then adds an arbitrary year to the end, and finally wraps the whole thing in a Date function.
2. Once you do this, you can put the newly created calculated field on the filter shelf as ‘Range of Dates’ filter.
3. You can then make it a Quick Filter. Before doing this you may want to format the date field to only show the month and day.
4. You will need to put your original date field on the columns shelf (in this case I put the Month of Order Date from Superstore. Put the Year of Order Date on the Color shelf. You can now filter from any Month/Day of different years and compare them appropriately.
5. You can add additional functionality if you like by adding a Quick Table Calculation of Year over Year Growth and adding it on a dual axis.
Hope this helps.
Same Time Last Year.twbx.zip 321.1 KB
1 of 1 people found this helpful
I believe you could accomplish this with a Date Parameter and then a couple of calculated fields.
The Data Parameter is simple--just call it something like "ChooseDate" and use it in conjunction with calculated fields.
[Last Year] (2011) would be:
+STR(YEAR([ChooseDate])- 1 ) //change
[2 Years ago] (2010) would be:
+STR(YEAR([ChooseDate])- 2 )
So you could do make a calculated field called "2010 Sales" as:
IF YEAR([SaleDate]) = 2010 AND [SaleDate] < [2 Years Ago]
2011 would be:
IF YEAR([SaleDate]) = 2011 AND [SaleDate] < [Last Year]
Then you play with those variables. If you still need help, could you post your workbook?