Posts tagged table calculation

Week 48: Profitability Bridge

This week we’re building a chart I was asked to create at work. A stakeholder drew this exact chart type and said, “make the chart look exactly like this!” At first glance I wasn’t sure I would be able to do it. After a little playing around I was able to re-create it!

Challenge

Click to view on Tableau Public

Requirements

  • Dashboard size is 500px wide by 800px tall.
  • Create a waterfall chart showing the top 5 sub-categories by sales. Include an other category for all other categories.
  • Show a bar on the far-left of the waterfall that shows all sub-categories. Label it all.
  • Add dashed lines that “connect” each bar.
  • Add a dashed line that connects the All bar with the Other bar.
  • Make sure each line looks as a single continuous dashed line. Watch your padding and axis label width!
  • Label each sub-category above the bottom line of each bar.
  • Label each bar with the profit ratio below the bottom line of each bar.
  • Add a filter by region. Make sure the filter is centered on the dashboard above the chart.
  • Color the bar gray if it above zero (#ACBAC3) or pink if it is below zero (#E48070).
  • Match tooltips.

Dataset

This week uses the superstore dataset for Tableau 2018.3.  You can get it here at data.world

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday2018 and tag @AnnUJackson, @LukeStanke, @lorna_eden,
@curtisharris_, @RodyZakovich, and @VizWizBI!

Track your progress

Also, don’t forget to track your progress using this Workout Wednesday form.

Week 46: America’s Aging Population

It’s been way too long since I’ve given you all a challenge. I’ve really enjoyed learning set actions the past two weeks, but if you know anything about me, you know I love table calcs. So guess what? I’m back with a table calcs challenge for you; I know deep down you’ve missed them.

In this week’s Workout Wednesday, you have to rebuild this chart I made for Makeover Monday week 45.

click to view on Tableau Public

Click here to see the original on my blog. NOTE: I disabled download on the workbook on Tableau Public to force you to think through the solution. Yes, I know it’s mean, but you’ll learn more this way.

Requirements

  • You may ONLY use table calcs. NO LODs.
  • Dashboard size: 800 x 700
  • You may only use one sheet.
  • Match the title, column headers and row headers.
  • You need to show the sex across the view and origin down the view. Make sure your sort order matches.
  • Each line represents the percentage of the total population for that age group for that year.
  • Each line must have a dot on the end.
  • The labels must be on the outside ends of the lines. The labels should be displayed as percentages to one decimal place. These are Tableau Medium 8pt. They must match the color of their respective lines.
  • Make sure the labels have enough space to display. You MAY NOT manually fix the axis.
  • I should only see 2016 and 2060 on the axis. There needs to be light grey gridlines for each of those two years.
  • For each section where the older generation (65+) crosses the younger generation (Under 18), you need display a black dot on the year that 65+ overtook Under 18.
  • You must display a dashed line with the year on the bottom right of the line for those lines that cross. The line needs to be at the same year as the black dot.
  • Match the tooltips (they show the year, the total population for each gender, and the percentage of the population for each gender.
  • The orange color is #E85839 (for 65+). The blue color is #3B6A9C (for Under 18).
  • Only show horizontal divider lines; no vertical divider lines.

DATA SET

Data from this week comes from Makeover Monday week 45 on data.world. Download here if needed.

SHARE

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday2018 and tag @VizWizBI, @AnnUJackson, @LukeStanke, @RodyZakovich, @lorna_eden, and @curtisharris_.

TRACK YOUR PROGRESS

Also, don’t forget to track your progress using this Workout Wednesday form.

HINTS

  • You will need a dual-axis chart, both of which are table calcs.
  • All four data points in the tooltip require table calcs.
  • The dashed vertical line requires a table calcs.
  • Create calculations to offset the years to give the ends of the lines enough space to display the labels properly.

#WorkoutWednesday 2018 – Week 3

Rody kicked things off last week with the running_sum() function. This week your challenge will be with both parameters and the window_sum() function. This visualization may look simple but it was a challenge for both Rody and myself (You’ll probably see a variant of this later this year).

Requirements

  • Data should be aggregated to the month.
  • Sales should be for a rolling 3 months
  • Order of the categories is dependent on the values at the parameter date. Larger values are stacked on top.
  • Pay attention to the color of #WorkoutWednesday title
  • Do your best to align the parameter with the x-axis. This way the controller is aligned with the reference line.
  • Match the axis labels and axis (non)titles.
  • Match x-axis major and minor ticks
  • Match the label format.
  • Match the colors using the Superfishel Stone color and Seattle Gray palette.
  • Your chart should range from 2014-Mar-01 to 2018-Mar-30.
  • Make sure your axes are synchronized (of course).
  • Share your your visualization with the parameter set to 2018-Feb-01.

If you need help check out the spoilers below.

This week utilizes the Superstore dataset. You can get it here at Data.World

As you complete this example, feel free to share on Twitter using the #WorkoutWednesday hashtag. Don’t forget to tag @RodyZakovich and @LukeStanke. We really want to see your work.

Good luck!

Spoilers

  • With your window calculations: pay attention to your window_sum() inputs. Read Tableau’s online help on table calculations.
  • This is a dual axis chart.
  • Use an IF statement to compare an aggregate of order date and the date parameter.
  • There are a number of ways to sort the stacks, I used an LOD inside an IF statement.
  • 65% opacity.