VizWiz

Launch, grow, and unlock your career in data

January 4, 2017

Workout Wednesday: Comparing Year over Year Purchase Frequencies

22 comments

What is Workout Wednesday? It’s a set of weekly challenges from Emma Whyte and me designed to test your knowledge of Tableau and help you kick on in your development. We will alternate weekly challenges: I will take the odd weeks and post them on my blog; Emma post challenges on the even weeks on her blog.

The idea is to replicate the challenge that we pose as closely as possible. When you think you have it, leave a comment with a link to your visualisation and post a pic on Twitter for others to enjoy.

Ok, so for week 1, I challenge you to recreate the visualisation below that helps identify the year over year purchase frequencies of Superstore (get the data here). The workbook is downloadable, but don’t cheat. Give it a real go before you download it to see if you got it right.

Here are the requirements:

  1. Y-axis is the cumulative % of total orders
  2. X-axis is the day of the year
  3. One line for each year, with the latest year highlighted
  4. Include a reference line for the target, which should adjust based on what the user enters
  5. Single select filter for Product Sub-Category
  6. Multi-select filters for Year, Region and Customer Segment
  7. Include a dot on each line at the first day when the cumulative % of order crosses the target
  8. Make the tooltips match mine
  9. Title should update based on the target entered by the user


22 comments :

  1. Whew, my brain is tired! https://public.tableau.com/profile/jeff.kritzman#!/vizhome/comparingyearoveryear/Dashboard1 @jeffkritzman

    ReplyDelete
  2. Was able to get everything except for the "% n of orders" dots and the correct formatting for reference line in the tooltip "50.0%" (didn't think about creating a separate calculated field that was just the value of our parameter...so simple).

    Also, calculated the day of year in a much less efficient manner, but now I know a much easier way of doing it. Thanks, Andy! This was a very worthwhile exercise.

    https://public.tableau.com/views/ComparingYOYPurchaseFrequencies/ComparingYOYPurchaseFrequencies?:embed=y&:display_count=yes

    ReplyDelete
    Replies
    1. Fantastic! Glad to hear you learned a lot.

      Delete
  3. Nice challenge! I didn't know that you could use datepart for day of year either--I used a datediff instead--and I used lookup() instead of window_min to get the marks on.

    Thanks to you & Emma for setting this up, I'm looking forward to the next one!

    https://public.tableau.com/views/WorkoutWednesday1_0/WorkoutWednesday1

    ReplyDelete
    Replies
    1. Good work! I like that you've done it a different way. Goes to show there's always more than one solution in Tableau.

      Delete
  4. New Year's resolution... to try to keep up with these... I like these gyms... here's my answer https://public.tableau.com/profile/donna.coles#!/vizhome/04012017-WW-YoYPurchaseFrequencies/YoYPurchaseFrequencies

    Some differences mainly in that I worked out day it reached target differently and how I then displayed the dot.

    Keep 'em coming - will try to keep up!
    Donna
    (PS can't figure out why my logged in accoutn says unknown *sigh*

    ReplyDelete
    Replies
    1. Nice work Donna! Glad you enjoyed the challenge!!

      Delete
  5. I love this idea and can't wait to play along. I had one question and one comment:

    In your version, should the highlighted year and total change if 2015 is removed from the filter?

    This might defeat the purpose of the exercise (or at least limit the features that can be used), but would it be possible to create the 'solution' in an earlier version of Tableau? IT limitations at work have me still on version 10.0, so I'm unable to open the solution you provide.

    Thanks again!

    ReplyDelete
    Replies
    1. I don't recall exactly what I did off the top of my head, but I think I set it to highlight the max Year of the whole data set not just what's in the view though that's probably how I should've done it. It's way easier to do with LOD in 10, but certainly can be done in earlier versions with table calcs.

      Delete
  6. Its a great way to learn Andy! Thanks for taking the initiative.
    I liked the way you are viewing data in this use case. Not just line/bar chart of orders count.
    Here is my version:
    https://public.tableau.com/profile/nishant.dialani#!/vizhome/WorkoutWednesday0104/Dashboard1
    Excited for next workout session ;)

    ReplyDelete
    Replies
    1. Good work Nishant. Glad you liked the challenge. Next week's will appear on Emma's blog.

      Delete
  7. I'm a big fan of this! it's how I used the monday makeovers too! Here was my version, don't know why my chart looks so different (different superstore data?). But I think I got all the parts in there.
    https://public.tableau.com/views/WednesdayWorkout1-5/Dashboard1?:embed=y&:display_count=yes

    ReplyDelete
    Replies
    1. Those dynamic markings were a major challenge
      https://public.tableau.com/profile/publish/WorkoutWednesday1_2/Dashboard1#!/publish-confirm

      Delete
  8. That was a fun way to use my lunch break :)

    I must confess that I got stuck the %n so I had to look at your workbook.

    https://public.tableau.com/profile/neil.lord#!/vizhome/ComparingYearonYearPurchaseFrequencies/ComparingYearonYearPurchaseFrequencies

    ReplyDelete
  9. Really enjoyed that, although must confess to having to resort to looking at your solution to get the circles correct

    Thanks
    Ali

    https://public.tableau.com/profile/ali.motion#!/vizhome/WorkoutWednesdayWk1-ComparingYearofYear/Dashboard1

    ReplyDelete
  10. This was a great idea! Focus on the technical skills instead of endless fiddling with the style. I also could not crack the dots, to be honest I still struggled to decode even after I downloaded the workbook :) Keep 'em coming!
    http://tabsoft.co/2iXqBiW

    Michal

    ReplyDelete
  11. Thanks Andy !

    Tableau Dashboard : https://public.tableau.com/profile/harsha.vardhan.sannareddy#!/vizhome/Workout_Wednesday_1/Workout_Wednesday_1

    However, I have copied and understand formulae.

    Added Max_Year to the title of chart too.

    ReplyDelete
  12. That was a ton of fun...humbling too!

    ReplyDelete
  13. Thanks so much for posting these challenges to encourage tableau enthusiasts to hone their skills. This is an excellent contribution to the community! Here's my solution - I have a feeling my solution for the circles is more complicated than it needs to be. Looking forward to studying others' workbooks.

    https://public.tableau.com/profile/andrew.robertson#!/vizhome/WorkoutWednesdayWeek1_2/Dashboard

    ReplyDelete
  14. Hi Andy, thanks for this exercise. I tried to recreate it. It was difficult. Some elements I just copied from your dashboard. But anyways I have some null values there. Is it a mistake? https://public.tableau.com/profile/elmurat.bavlankulov#!/vizhome/WorkoutWednesday1_7/Dashboard1

    ReplyDelete