
1. Re: Comparing 2 different periods on same data
Joe Mako Sep 5, 2011 9:21 PM (in response to Shane Steward)5 of 5 people found this helpfulThere are many options when it comes to dealing with date calculations in Tableau. Attached is an example. You will want to think about how you want to deal with weeks, I did not make any allowances in the attached, and you can see that the same week is in both years, There are options to deal with this, it all depends on your business logic.

2. Re: Comparing 2 different periods on same data
guest contributor Sep 14, 2011 6:17 AM (in response to Shane Steward)Hi,
Can i have the same twbx in tableau 6.0 version since i also require similar solution for one of my reports?
Thanks & Regards,
Sushma K

3. Re: Comparing 2 different periods on same data
Joe Mako Sep 14, 2011 6:21 AM (in response to Shane Steward)Sushma, Although I recommend using the most current version of Tableau, you can run both 6.0 and 6.1 on the same computer at the same time. I do not plan on remaking this workbook in an earlier version.

4. Re: Comparing 2 different periods on same data
James Cartwright Oct 26, 2011 6:14 AM (in response to Shane Steward)Hi Everyone!
First post, and a complete newbie to Tableau so bear with me...
I think this thread is relevant to what i want to achieve, but i can't quite work out how to tweak the workbook to answer my specific questions which are:
1. Measure MTD, QTD, and YTD vs. MTD1, QTD1 and YTD1 for all my metrics (plus looking at this thread also being able to compare against previous period as opposed to period  1 year)
2. Ensure that when comparing against previous periods, only summing upto the current date in the month (e.g. upto 25th October 2011 vs. upto 25th October 2010 for MTD, or from 1st October, upto 25th October 2011 Q4 2011 vs. same date range for 2010)
3. Be able to view all metrics at once (currently only 2 metrics in data BR and TD, set up as parameter to view by model)
4. Ideally be able to show traffic light of Month on Month, Quarter on Quarter etc  can't see how to do this without creating separate tables for these measures.
See the attached for what I have managed so far. This approach uses the MTD etc measures to show the period comparisons, with the metric parameter coded within the calculation. This limits me to showing only one metric at a time.
Sorry for long post, but I am a bit stuck, and know there must be a better way to achieve my goal

kpi_weekly_v3.twbx 680.4 KB


5. Re: Comparing 2 different periods on same data
Emily Mueller Mar 29, 2012 9:24 AM (in response to Joe Mako)Joe would it be possible to show these week over week comparisons on a line graph?

6. Re: Comparing 2 different periods on same data
arthi.keat Feb 20, 2013 2:34 PM (in response to Joe Mako)Thank you Joe. The worksheet has been very helpful.
I was trying to recreate the same worksheet but for some reason I am not able to get any values in the "Selected Over Text". Can you pleae help look into it and see what/where I am missing some thing.
Thanks for your time..

SuperStore.twbx.zip 1.3 MB


7. Re: Comparing 2 different periods on same data
Shawn Wallwork Feb 20, 2013 3:15 PM (in response to arthi.keat)Since Jonathan just help me understand one of Joe's workbooks that used nested table calculations it's only fitting I pay this one forward.
Arthi, when you see a table calc that doesn't have any compute using checked:
Then you know either it is an "Advanced" compute using or it is a nested table calculation or both. In this case it is both. The first one is a straight up compute using 'Year':
But the other one (the one you probably missed) was the "hidden" one:
And when you look at "Previous Text" you'll see he has set up an advanced compute using:
And that Advanced looks like this:
The order of the Compute Using pane can at times make a difference, so if you're following one of Joe's workbooks make sure you sort them the same way. (See attached.)
Shawn

SuperStoreSW.twbx.zip 1.3 MB


8. Re: Comparing 2 different periods on same data
arthi.keat Feb 20, 2013 3:50 PM (in response to Shawn Wallwork)Thank You so much Shawn. I would have never figured it out. I got this one down.
Can you help me answer one more question. Data shows up only when we select 'Month' in "Select Date Level". But is null for other selections. Would you be able to help me on this one..
Thanks in advance for your time n help...

9. Re: Comparing 2 different periods on same data
arthi.keat Feb 20, 2013 4:00 PM (in response to arthi.keat)Got it..
I missed setting Table Calculations for all..
Thanks for your help..

10. Re: Comparing 2 different periods on same data
Joe Mako Feb 20, 2013 4:32 PM (in response to Shawn Wallwork)1 of 1 people found this helpfulTo expand on Shawn's comment
The order of the Compute Using pane can at times make a difference
The sort order of dimension pills in the Compute using list box on Advanced dialog makes a difference in these situations:
 Order Along is Automatic
or
 At the Level is not "Deepest", and not the last one in the list, eg "Date Level" in this screen shot (two options in the dropdown mean the same thing)
or
 Restarting every is not "None"And said the other way:
The sort order of the dimension pills in the Compute using list box on Advanced dialog does not make a difference in this situation:
 Order Along is specified
and
 At the Level is "Deepest", or the last one in the list, eg "Date Level" in this screen shot (two options in the dropdown mean the same thing)
and
 Restarting every is "None"Also depending on the table calculation in use, formula logic, and your data contents will impact if you see a noticeable difference or not.
So in short, Shawn is correct, "The order of the Compute Using pane can at times make a difference."

11. Re: Comparing 2 different periods on same data
chaitanya kaita Mar 5, 2013 10:33 AM (in response to Joe Mako)Hi Joe,
I am a new Tableau user and have been asked for some complicated dashboards.
The requirement is to compare Last 4 weeks from last saturday VS Prior 4 weeks for current year and last year.
Below are some date parameter examples ( all are compred against last year)
L4W Vs P4W
LW Vs PW
Last Month Vs Prior Month
I have followed the same in my workbook but a little confused. Could you please help me figure out.
Attached is the workbook.

12. Re: Comparing 2 different periods on same data
Garry Williamson May 19, 2013 12:34 PM (in response to Joe Mako)I rebuilt some of this on my own in a new workbook to learn, but i dont get why the year ago clicks and the previous clicks both have the same formula: Lookup(sum([clicks]),1)
That logic for some reason is escaping me.
Thanks
Garry

13. Re: Comparing 2 different periods on same data
Elad Lanir May 29, 2013 5:26 AM (in response to Joe Mako)1 of 1 people found this helpfulHi Joe,
First, thank you for your time and neat solution (and steps).
I managed to recreate your solution on my data and it works great! But I did encounter one issue that I'm not sure how I can solve: on the row shelf, I added another dimension for which I want to display the WoW calculation per that dimension value, and the user can select from a filter the period of comparison he wants to display.
The problem begins when one of the values has data for current week but no data for last week, while all other values do have data for last week. In that case, the 'Selected over text' dimension has two consecutive values because, for the one value with no data on last week, the logic of (lookup (<measure>, 1)) will return 2 weeks ago's data and the 'Selected over text' will look like this:
I guess that for those values who had data this week and no data last week, my expectation was to see '0' on the 'Compare to' column.
Any idea how can I solve this tweak?

14. Re: Comparing 2 different periods on same data
Joe Mako Jun 11, 2013 5:23 PM (in response to Elad Lanir)Can you please provide a sample packaged workbook with data that represents your situation, and detail what you expect for results and interaction? Thank you.