Online tableau training, tableau tips, & video tutorials
An Introduction to Tableau SetsPreview
Segment dimension members for better comparisons
Learn how to create sets and add depth to your analyses by using sets as a filter, dimension, or a highlighter. You’ll discover how each of these approaches creates easy comparisons and reveals new context.
Hi. This is Ryan with Playfair Data TV. And in this video, I’m going to give you an introduction to a very powerful technical feature in Tableau called sets. Sets are really powerful because it’s a really easy way to create segmentation in your analysis, and segmentations always help you avoid that question, “So what?”. It helps provide context, comparisons, and make your data a little bit more actionable. We’ll create different segments that we may want to treat differently later on.
There are two different ways to create sets. The first way I’m going to show you is static. In this example, let’s say that we wanted to isolate our top 10 customers by their sales amounts, because we might want to treat them a little bit differently. We might want to see, what kind of products are they buying? Are they using discounts? Where do they live? Maybe there’s some other demographic information we can get about them to find out why they’re buying so much. We want to replicate that behavior.
The first way to create a set is to simply choose the dimension members that you want to place into a set manually. So I’ve got this bar chart that looks at the Sales measure by Customer Name, and I’m just going to choose the top 10 customer names on this view.
And if I hover over any dimension member, I see these choices– Keep Only and Exclude are filters. These next two buttons allow you to sort in ascending or descending order. This paperclip icon is for creating groups, and the one that we’re focused on at the moment is this Venn diagram-looking icon. That will create a set.
If I click on that and click Create Set, this window opens where I give the set of dimension members a name. These are my Top 10 Customers by Sales. I’m going to click OK, and we see that new set appear in the Sets area of the Data pane. I’m going to de-select these now and show you several different ways to use sets.
The first way to use a set is as a filter. If I drag this set to the Filters Shelf, the worksheet only includes those 10 members that are in the set. Sets are Boolean, meaning there’s only two outcomes. You’re either in the set or you’re not. That’s why when we added this set to the Filters Shelf, by default, what it did is just showed me the dimension members that were inside of that set.
There is one other choice. If you click into a set that’s being used as a filter, you can change the default settings to instead of just showing who’s in the set, you can show whether or not they are in the set. So if I click that option instead, it’s giving me the choice. For now, I’ll choose both in and out of the set.
But if I show this filter, now my end user can decide. Do they want to see just the dimension members in the set, just the dimension members out of the set, or both?
The second way to use a set is as a dimension. If I put that Top 10 Customers by Sales set onto the Columns Shelf, it will create two columns for me in this bar chart. Again, it’s Boolean, so we just have two columns. The left side, we’re looking at all the dimension members that are inside of that set. On the right side, we’re looking at everybody else.
This might make a little more sense if I were to drag that set to the Rows Shelf, and essentially, this is just drawing a line after the top 10. So we now have a row for if you’re in the set and then a row for everybody else that’s outside of the set.
But probably my favorite way to use a set is as a highlighter. To illustrate this one, I’m going to go to this scatter plot, and I’m going to drag the Top 10 Customers by Sales set to the Color Marks Card. Now everybody in the set is colored one thing. Everybody else is colored a second thing. And I typically make the color for the people in the set a brighter color so it stands out a little bit more on the view.
But we’ve just highlighted this set of what we thought were our best-performing customers within the context of everybody else. There’s 793 customer names on this view at the moment, so each circle represents 1 of 793 customers. But the 10 that are in the set have been highlighted in that red color.
There’s one really interesting one that’s standing out to me. Let’s hover over and see how it looks and get more information about it. It’s a customer named Sean Miller. He’s in our top 10 set. In fact, he’s our highest-selling customer. But when we looked at it through this different lens with this different context on a scatter plot, we can see that we’re actually losing money on Sean Miller.
So this is one of the reasons I really like to use this type of segmentation, and this also is going to be an important theme throughout the analysis videos on Playfair Data TV. It always helps to look at your data in different ways. Usually, there’s a certain chart that’ll help get you to 60% or 70% of the value with different business situations and questions that you may have, but it always helps to slice and dice the data in different ways, and here’s a really good example of that.
When we were looking at just our sales by customer, Sean Miller did so well that we might be reaching out to him. We might want to send him on a cruise or give him some discount. But when we added context by looking at it in a different way and highlighting him in context of everybody else, it tells a much different story.
But that’s just a few different ways to use sets. This is a really powerful way to do segmentations in your data sets in Tableau.
This has been Ryan with Playfair Data TV – thanks for watching!
Related video: Four Types of Filters in Tableau
Related video: Tableau Classification: Measure vs. Dimension
Related video: 3 Ways to Make Stunning Scatter Plots in Tableau
Related blog post: Practical Tableau – An Introduction to Sets
Related chapter: Practical Tableau – Chapter 15 – An Introduction to Sets