Online tableau training, tableau tips, & video tutorials
How to Make Unit Charts in TableauPreview
Add detail to bar charts by stacking equally sized units
Unit charts are stacked bar charts made up of individual, and equally sized, units. Since the level of detail must include the dimension members creating the units, you can add extra context via the Color and Tooltip Marks Cards.
Hi. This is Ryan with Playfair Data TV. And in this video, I’m going to show you how to make unit charts in Tableau. Unit charts are stacked bar charts. So they’re made up of individual stacks, but the key is, those individual stacks are all the exact same size.
The one example that I know of to share with you from the Sample – Superstore dataset is with order IDs. So if I wanted to stack up my orders, each order would represent one value. So each stack would be the same value, one unit.
So to start this view, I’m going to right-click on the Order ID field, which will allow me to change its aggregation when I add it to the view. So I’m going to right-click Order ID, drag it to the Rows Shelf, and choose COUNTD. And I’ll break that count down.
So just to point out, we’ve got 5,009 unique orders at this point. But I will now break that down by the Category dimension by putting the Category dimension onto the Columns Shelf. I’ll go ahead and sort this in descending order. So at this point, we have a bar chart. COUNTD Order ID. So in other words, unique orders by category.
To convert this to a unit chart, I need to change the level of detail. And what I need to do is specify what those unique units are. In this case, we’re using Order ID. Each of those order IDs represents the number 1. So I’m going to place the Order ID dimension onto the Detail Marks Card.
And this just got a lot more granular– in fact, so granular that it appears the color of the bars changed. What happened is, they’re still blue– see, if I click Color, I see the blue color. But they’re so close together that the borders are all overlapping, giving it that gray appearance. But notice, as I hover over and scroll down, these are all unique orders.
We technically already have a unit chart, actually, but this one’s not very useful. There’s just too many marks on the view. So what I’m going to do to help illustrate this is drag the Order Date dimension to the Filters Shelf and choose a range of dates.
And maybe I’ll just look at the last week or so in this dataset. So Christmas day 2018 to the end of the year 2018, which is how far the Sample – Superstore dataset currently goes. I’ll click OK.
And now that we have a much shorter range, we just have fewer orders to visualize. And now we can see those individual units. So it’s a stacked bar chart. You’ve likely heard me mention this on other videos.
But stacked bar charts are usually my least favorite chart type because, unless you are the stack on the bottom, it is very hard to compare the trends and/or compare the distinct dimension members across the bar chart. So for that reason, I typically don’t like stacked bar charts.
But unit charts are a little bit different. These are all the exact same size, each of the units, so you can compare their trend. And you can look at it in multiple ways. You can look at the top of the unit chart to know which category performed the best overall. You can also look at individual units.
I should point out both sides of the argument. There are some famous authors, like Stephen Few, who aren’t a big fan of this chart type. At least that’s the latest opinion that I had heard. He released a whitepaper called “Unit Charts Are for Kids,” for example.
His argument is, he thinks that unit charts kind of implore you to slow down and count the number of units in each bar. So he thinks a bar chart is better because you don’t have to slow down. You automatically can use the preattentive attribute of height or length to see what the best performer was.
However, I do like unit charts. And I think Steven Few’s opinion was put out there before tools like Tableau. Because what I like about unit charts is, you can add additional context, and you can get down to that individual unit. So if were looking at orders, you could hover over it and get more information about that via the tooltip.
Let me give an example of some extra information you could provide to this. If I were to put the Profit Ratio measure onto the Color Marks Card. And that’s probably too much color, so I’ll just double-click on this, bump the steps down to two.
And we’ll say, red if below 0 and this kind of neutral blue if above 0. Click OK. Because we got rid of that shading, we’ve lost where the units were. They’re still there, but we need to also add a border to these so we can get the appearance of those individual units back.
But here’s what I was talking about with that extra context. Now I know not only that Office Supplies had the most orders, I can also see how many of those orders had a negative profit ratio. So that’s really important context. On the surface, if we just looked at this as a bar chart, it would look like Office Supplies was dominating the rest of the business.
But then when you take a closer look and add that context, via the Color Marks Card, and because we’ve got those individual units in there, we can now see things like, sure, had the most unique orders, but it also had the most orders with a negative profit ratio.
So maybe you want to dig a little bit deeper before we give the manager of the Office Supplies category a bonus. But that was unit charts in Tableau.
This has been Ryan with Playfair Data TV – thanks for watching!
Related video: 5 Ways to Make a Bar Chart in Tableau and An Introduction to Aggregation
Related video: Tableau’s Detail Marks Card and Visualization Level of Detail
Related video: 3 Ways to Make Beautiful Bar Charts in Tableau
Related blog post: The Case for One-Dimensional Unit Charts
Related chapter: Practical Tableau – Chapter 62 – The Case for One-Dimensional Unit Charts
Chart Types Videos
- 3 Ways to Make Beautiful Bar Charts in Tableau
- 3 Ways to Make Lovely Line Graphs in Tableau
- How to Make Dual-Axis Combination Charts in Tableau and Some Creative Applications
- Exercise: Dual-Axis Combination Chart
- 3 Ways to Make Handsome Highlight Tables in Tableau
- 3 Ways to Make Stunning Scatter Plots in Tableau
- Exercise: Make a Scatter Plot in Tableau
- An Introduction to Mapping in Tableau
- Exercise: Dual-Axis Map in Tableau
- How to Make Sparklines in Tableau
- How to Make a Timeline in Tableau
- How to Make Dynamic Bump Charts in Tableau
- How to Make Bullet Graphs in Tableau
- How to Make a Waterfall Chart in Tableau
- Two Ways to Make Dynamic Slope Graphs in Tableau
- Two Ways to Make Dumbbell Charts in Tableau
- Why and How to Make Jitter Plots in Tableau
- How to Make Unit Charts in Tableau
- How to Make Unit Histograms in Tableau
- How to Make Connected Scatter Plots in Tableau
- How to Make Leapfrog Charts in Tableau
You are watching free video previews – sign up for a monthly subscription or lifetime membership to enjoy access to our entire library of high-quality, full-length videos.
📢 Our biggest sale ever – 50% Lifetime memberships through Cyber Monday, 12/2.
already a member? sign in