Latest

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.

Week 45: Cross-Highlight

Continuing in line with Ann, I thought it would be great to do another challenge around Set Actions. I’ve used “Cross-Highlighting” in Tableau before, but it required a lot of Data Modelling, and was extremely slow on the Public Servers. But with Set Actions, what use to be a very complicated task, can now be down very quickly. There are a lot of great analytical powers with Set Actions, but there are some nice UX ones as well.

https://public.tableau.com/views/Cross-Highlight/CROSS-HIGHLIGHT?:embed=y&:display_count=yes&publish=yes

Requirements

  • Dashboard size: 520 x 560; 1 sheet
  • Create 2 Parameters
    • Y Axis: Category and Sub-Category
    • X Axis: Region and Segment
  • Create a Crosstab that shows Sales based on the Parameter Selection
  • ***On Hover*** highlight all values in the same Y/X column as the mark being hovered over.

FYI: Set Actions aren’t quite working on Tableau Public, so I encourage you to download the workbook and view in 2018.3 to explore the full interactivity!

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

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

Week 44: Ready, Set: Let’s Drill Down on Sales!

At time of writing Tableau 2018.3 was just released.  With it comes some brand new features, including the one that’s the focus of this workout: set actions.  Sets have long been a feature in Tableau and are responsible for creating dashboard actions, but set actions are something completely new.  Set actions allow you to interact with your data to determine what data elements are part of the set, essentially sets become more dynamic.

One of the most straightforward uses of set actions is one that was demonstrated during Devs on Stage at TC18 – drilling down on the same sheet.  They showed a video that included drilling down on a treemap from one level of detail to a lower granularity, to a third granularity.

So my challenge for you this week is to learn more about sets and set actions.  You’ll find these to be extremely useful moving forward on drill-filtering on the same sheet – both on maps and when you’re trying to explore more detail.  Not a lot of showy formatting or sophisticated calculations – your only goal is to get comfortable with set actions.

click to view on Tableau Public

Requirements

  • Dashboard size: 1200 x 800; 2 sheets
  • Create a line chart of monthly sales
  • Create way for user to select months and drill/filter the line chart, this should also filter the treemap below
  • Create a treemap of sales by category that has the ability to drill to sub-category and product name upon clicking
  • Create dynamic labels (and tooltip) for the treemap that display based on the level of detail shown (category/sub-category/product name)
  • Match all other formatting, labels, and tooltips
  • Add a region filter for fun

FYI: Set Actions aren’t quite working on Tableau Public, so I encourage you to download the workbook and view in 2018.3 to explore the full interactivity!

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

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

Week 43: Where should we focus our sales effort? #TC18 Edition

Heads up: we are at Tableau Conference and we’ll be delayed on checking Twitter. Also Luke will attempt to live stream via Twitter.

Challenge

This week we take Workout Wednesday live at Tableau Conference.

Click to view on Tableau Public

Requirements

  • Create a map and color the overall top, top 5, bottom, bottom 5 states by sales.
  • Label the top 5 and bottom 5 states.
  • Add a filter for segment.
  • Show the city with the top sales for every state.
  • Place a star on the top 5 cities. Place an x on the bottom 5 cities. Place a circle on all other cities.
  • Size the star to be the largest, then the x, then the circle.
  • Match map formatting.
  • Match tooltips.

Dataset

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

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI too – he would REALLY love to see your work!)

Track your progress

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

Week 42: Radial Mapping

Getting a little bit tricky this week, mostly because I won’t be at TC this year….. 🙁

This week we are going to do some radial mapping in Tableau. While extensions might replace this trick, I think it’s still useful when analyzing locations within N miles of a target location.

Click Image for Interactive Version
(Click for Interactive Version)

Requirements

  • This is a tricky one, so the first thing you want to do is get all the Lats/Longs for City/State from SuperStore and create a new dataset with it. You need to be able to use the Lats/Longs in calcs, and we can’t use generated lat/longs at the moment.
  • Create a Parameter for City/State
  • Create a Parameter to set the number of miles
  • Create a Map of Sales for City/State sized by Sales
  • Draw a Radial Circle around the selected location that has a radius equal to the Miles Parameter.
  • The Map should be filtered down to only show locations within the Radial Circle
  • This does require some data modelling…if you get stuck, check out my blog post on radial mapping.http://www.datatableauandme.com/2017/12/radial-mapping-in-tableau.html

Dataset

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

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson@LukeStanke, and @RodyZakovich.  (Tag @VizWizBI too – he would REALLY love to see your work!)

Week 41: Top & Bottom Highlights

This week’s workout is designed for the end user looking for immediate insight – think of an executive stakeholder or someone more drawn to quickly getting numbers and results.  These folks don’t necessarily have the time to look deeper into the details, but are still craving data in context.

To satisfy their requests you’ll be creating a small multiples dashboard that highlights different combinations of dimensions based on what the user selects.  It also has strategically placed labels that give the most pertinent information – total sales for the chart shown and the most recent monthly measurement.

Click to view on Tableau Public

Requirements

  • Dashboard size: 1200 x 900
  • Create small multiples showing monthly sales from 2017 & 2018 by Category and Region
  • Create color highlight to meet these 6 conditions
    • Highlight top category per region (by sales)
    • Highlight bottom category per region
    • Highlight top & bottom category per region
    • Highlight top region + category combination
    • Highlight bottom region + category combination
  • Create a label that shows the Total Sales in the top middle of each small multiple
  • Create a label that shows the most recent sales in the lower right of each small multiple
  • Create a dynamic title that changes based on the highlight chosen
  • Match tooltips and interactivity – mark type matters!
  • Match all formatting

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

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

Week 40: Where are Sub-Category Sales Down?

Challenge

This week you are building something that looks like a text table. But there are a few twists, including the fact you cannot use text as a mark type.

click to view on Tableau Public

 

Requirements

  • Use the shape mark type.
  • Do not create a custom mark type that is transparent.
  • Round sales to the nearest dollar. Make sure the values are right-aligned.
  • Make sure to add banding that alternates from sub-category to sub-category.
  • Place a red arrow down (▼) to the right of sub-category sales that are down compared to the year previous.
  • Place a red arrow down (▼) in front of a sub-category label in the table if sales were lower in 2018 compared to sales in 2015.
  • Show only order dates for 2016, 2017, and 2018 in the table.
  • Colors are Dark gray (#414141), medium gray (#6B6B6B), and red (#F36754)
  • Be able to slice the data by Region.
  • Match tooltips
  • BONUS: embed a visual in the tooltip that shows yearly sales on a continuous axis and has a “▼” on the years where sales were down compared to the year previous.

 

Dataset

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

 

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI too – he would REALLY love to see your work!)

 

Track your progress

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

 

WEEK 39: VERTICAL LABEL AND 3 MARKS

Hello Again! This week I am back with a fairly simple challenge, but one that has a few (I believe) useful tricks that could help spice up your next viz. The tricks used here are geared toward design, but have additional benefits.

Requirements:

  • Dashboard size: 1000 x 800
  • Create a Parameters for metrics Sales|Profit|Quantity
  • Create an Area Chart with a Line and Circle Marks for the Selected Metric over Month/Year of Order Date
  • The Metric Selected must be Vertically displayed on the Y Axis, this is dynamic based on the Metric Parameter, and is a single calculated field. 
    • DON’T HARD CODE THE LABELS! Think through what features Tableau offers that allow you to dynamically change/format strings
  • Pay attention to White Space and weighting!

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

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

Week 38: Discovery Dashboard

One of my absolute favorite things about Tableau is that not only is it a fantastic data display tool, but it is amazing at data exploration and discovery.  While you’re in the flow of analysis there are tons of built in features that provide you feedback, awareness, and insight into your data.  Everything from displaying the number of marks on a sheet in the lower left corner (along with the sum of a measure) to exposing the worksheet summary card.  You can customize it to show you so many options and it’s one of the first tools I use when getting hands on with new data.

But what if you want to enhance your end-users’ capabilities and provide them with the same interaction you’re afforded in desktop?  Enter this week’s challenge: the Discovery Dashboard.  Designed off of a scatterplot, it’s goal is to give interactors the same features, insights, and tools that you passively have access to – all from Server and without the necessity of desktop or knowledge of how to develop.

This week your challenge is to recreate this guy (this is animated, so give it a moment!):

click to view on Tableau Public

Requirements

  • Dashboard size: 1100 x 900; 4 sheets tiled
  • Create a scatterplot of Sales vs. Profit with Segment on color
  • Create BAN of total marks, total sales, total profit
    • Include supporting information (min, max, slicing information)
  • Create controls that allow the user to
    • Change how the data is sliced (scattered)
    • Separate out segments to different rows
    • Separate out years to different columns
    • Add or remove reference lines
  • Match titles of each axis
  • Match tooltips
  • BANs should respond to selection inside of the scatterplot
  • Don’t forget the color legend & line formatting!

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

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

Solution: Paying The President

We’re working on providing different solutions for the rest of the year. While it’s not a guarantee that we’ll have one every week, we want to dispel any myths around the difficulty of the problems.

Last week Curtis made a video on how he created the solution. He’s going to do this every week. Curtis didn’t get it perfect but that’s okay it’s really close!

I’m not going to show you how to do every part, but I will show you a few tips that will get you going!

First let’s review the modified brief that I’ll use for this demo:

  • Dashboard size: 900px x 620px.
  • Background color: #F9F8F7
  • The data has unknown dates. Make all unknown values show up 3 months past the maximum date. If you need help see SPOILERS #1 below for the formula.
  • Create the stacked rectangle plot at the Source level. Use Size to size the boxes. Place a space of 0.01 between each of the squares. Make sure the order of the boxes matches, too. *This is the key challenge this week*
  • Create an “axis” that labels the start of each year as black and abbreviated month labels of April, July, and September, respectively. Also label the unknown values with “Unknown”. See SPOILERS #2: for help with the “axis”. And see SPOILERS #3 for the month label.
  • Color by source_group: Donald J Trump For President: #F7C480, Other: #76B7B2, Taxpayers: #555555
  • Add annotations for when Trump announced candidacy, gets nomination, the election, and inauguration. You’ll want this: ▼
  • Add the annotation around incomplete/missing data.
  • Add the divider and bracket on the dashboard.
  • Match tooltips.
  • Credit the original authors/designers and link to the original:
    Originally by Derek Kravitz and Derek Willis, ProPublica, and Paul Cronan, Mark Schifferli and Charlie Smart, Fathom Information Designhttps://projects.propublica.org/paying-the-president/.

So were talking about just 3 points. And I give you help with two of them!

Step 1: Unknown Dates

First you need to figure out the unknown dates.

IFNULL([Date], DATEADD("month", 3, {MAX([Date])}))

Put this on Columns and make it date value at the month level.

You’ll end up with this:

Step 2: Create mark logic + add level of detail.

Next were going to figure out the spacing for the marks. The formula utilizes the height of each square and then adds .01. After that we subtract half the hight of the square to center the mark where it should be. The final formula looks like this.

RUNNING_SUM(SQRT([Size]) + .01) - SQRT([Size])

Set your mark type to square and it produces this visual:

The sizing calculation before the appropriate marks are ordered on the marks card.

Next up: Let’s add the correct level of detail to the marks card. Add exact date, source to detail. Source (group) to color, and Size to size. That will give you an imperfect visual where you need to edit the table calculation (be sure to re-order the values).



Once you have edited this you end up with this visual:

It’s almost there!

It’s so close!

Step 3: Dual Axis of MIN(-3) and format.

So were basically there already. Now come’s the trick with the axis. I created a dual axis chart with the second value just an in-line calculation of MIN(-3). Synchronize this and remove all the values from this marks card.

After that you just need to create two calculations. One for the bold font and one for the gray font. Then place these on text on the marks card and format.

Years calculation (also in spoilers):

IF MONTH([Date]) = 1
OR DATETRUNC("month", [Date]) = {MIN(DATETRUNC("month", [Date]))}
THEN STR(YEAR([Date]))
ELSEIF DATETRUNC("month", [Date]) = {MIN(DATETRUNC("month", [Date]))}
THEN "Unknown"
ELSE "" END

Month Calculation: 

IF DATETRUNC("month", [Date]) != {MIN(DATETRUNC("month", [Date]))}
THEN IF MONTH([Date]) = 4
    THEN "APR"
    ELSEIF MONTH([Date]) = 7
    THEN "JUL"
    ELSEIF MONTH([Date]) = 10
    THEN "OCT"
    ELSE ""
    END
ELSE ""
END

Now we just add these to text on marks and format like this:

Year and Month labels.

Then we have this:

Note the faux axis labels.

Step 4: Format

Finally we need to revers our axis, hide our axes, and format. Then we end up with the final product looking like this:

Not bad.

Not bad for 4 steps!