Tableau Deep Dive: Sets – IN/OUT

Data

Tableau Deep Dive: Sets – IN/OUT

Tableau Deep Dives are a loose collection of mini-series designed to give you an in-depth look into various features of Tableau Software.

In all of our previous examples of this Deep Dive, we’ve been adding our new sets to the Filters card. That’s filtering our view (as well as limiting the membership available in our filter control as we did in part two). What happens if we drag our set directly onto our Rows or Columns? What else is possible by using our set on the Marks card?

Let’s find out!

Show IN/OUT of Set

I’ve created a computed set for the Top 100 Most Profitable Products using the Sample – Superstore data source that comes ready to use with Tableau Desktop. Remember, I’ll use the Top tab in my Create Set window (see part three). Here’s what it looks like when I drag that set onto Rows and Sales to Columns:

Result in Tableau

Notice how my new set is treated on the Rows shelf. It is now showing IN/OUT in the set capsule. The set reflects a Boolean relationship. The IN is everything that is inside of my set (i.e. the top 100 most profitable products) and the OUT is everything that does not qualify for my set.

We can edit the aliases of my set, IN and OUT, to make them more relevant to our view. Let’s change them by right-clicking on the set on the rows shelf and selecting Edit Aliases:

 Edit Aliases

In addition, we’ll drag another instance of our set onto Color and change Sales’ aggregation from sum to average. That gives us the following view which really illustrates the differences between the members of the set. It makes sense that our most profitable products are also driving a lot of sales:

Change to average

Show Members IN Set

I can turn off the IN/OUT setting to display the most profitable products in my set by right-clicking on the set capsule and selecting Show Members in Set:

Show members in set

This option excludes the OUT membership and instead shows each member of the IN set. Tableau will automatically add the set to the Filter card and select the IN option. This makes sense as we are filtering the OUT membership from our view:

Filtering OUT

Let’s look how toggling the IN/OUT and IN-only options on the set will appear on a scatter plot. Here’s a sample scatterplot with the set showing both IN/OUT:

Sample Scatterplot

Blue marks are the IN membership and grey marks are the OUT membership. Let’s toggle the IN/OUT option on the set, which is on the Color button:

Toggle IN/OUT

It filters the OUT membership and then colors the IN membership uniquely. Again, notice the set is added automatically to the Filter card. This switch gives us this result:

The switch

IN/OUT on the Row Level

Let’s consider a use case. We’ll build the following view with sum of Sales by discrete years for Order Date and Market, like so:

Build a view

I want to show the breakdown by each region for each year of the percent of total of sales, comparing the top 100 most profitable products against the rest of the product list. First, I need to add a Quick Table Calculation > Percent of Total. I want to make sure that my scope is Cell:

Table Calculation

Here’s how my view looks for now:

Initial view with table calculation

Now let’s add our set to the Color button to break down each cell into members IN the set and those that are OUT of the set as a percentage of Sales for each market by year:

Final view

Eureka! Now we can see how much our top profit products contribute to the total sales for each region over time. In the viz above, we can see the East has less reliance on our top products than other regions. As a result, the distribution of our product line is strongest in the Eastern region.

What’s Next?

In our next article in the Sets Deep Dive, we’ll examine Combined Sets. Remember, share any thoughts or feedback in the comments section provided below. I look forward to your feedback!

Want More Tableau Deep Dives

  1. Tableau Deep Dive: LOD – Introduction to Detail
  2. Tableau Deep Dive: LOD – The Include Calculation
  3. Tableau Deep Dive: LOD – The Exclude Calculation
  4. Tableau Deep Dive: LOD – The Fixed Calculation
  5. Tableau Deep Dive: LOD – LOD Calculations vs. Table Calculations
  6. Tableau Deep Dive: Parameters – Parameter Overview
  7. Tableau Deep Dive: Parameters – Parameter Properties
  8. Tableau Deep Dive: Parameters – Filtering – Top N
  9. Tableau Deep Dive: Parameters – Calculated Fields
  10. Tableau Deep Dive: Parameters – Filtering Across Data Sources
  11. Tableau Deep Dive: Parameters – Bins
  12. Tableau Deep Dive: Parameters – Reference Lines
  13. Tableau Deep Dive: Parameters – Table Calculations
  14. Tableau Deep Dive: Sets – Introduction to Sets
  15. Tableau Deep Dive: Sets – Constant Sets
  16. Tableau Deep Dive: Sets – Computed Sets
  17. Tableau Deep Dive: Sets – IN/OUT
  18. Tableau Deep Dive: Sets – Combined Sets
  19. Tableau Deep Dive: Sets – Calculated Fields
  20. Tableau Deep Dive: Sets – Hierarchies
  21. Tableau Deep Dive: Dates – Introduction to Dates
  22. Tableau Deep Dive: Dates – Preparing Dates
  23. Tableau Deep Dive: Dates – More Date Functions
  24. Tableau Deep Dive: Dates – Exact Dates
  25. Tableau Deep Dive: Dates – Custom Dates
  26. Tableau Deep Dive: Dates – Rolling Dates
  27. Tableau Deep Dive: Dates – Calendar Filters
  28. Tableau Deep Dive: Dates – Week-by-Week Comparison
  29. Tableau Deep Dive: Dashboard Design – Planning
  30. Tableau Deep Dive: Dashboard Design – Layout & Structure
  31. Tableau Deep Dive: Dashboard Design – Proof of Concept
  32. Tableau Deep Dive: Dashboard Design – Adding Interactivity
  33. Tableau Deep Dive: Dashboard Design – Visual Best Practices
  34. Tableau Deep Dive: Dashboard Design – Optimization & Governance
  35. Tableau Deep Dive: Dashboard Design – Publishing
  36. Tableau Deep Dive: Table Calculations – Custom Sorts, Part One
  37. Tableau Deep Dive: Table Calculations – Custom Sorts, Part Two
  38. Tableau Deep Dive: Table Calculations – Custom Sorts, Part Three

More About the Author

Robert Curtis

Managing Director, APAC
Building Solutions with InterWorks at Corinium’s Data Architecture Conference in Melbourne InterWorks was a proud sponsor of the Data Architecture Conference hosted by Corinium in Melbourne on 21 and 22 June 2023. Hundreds of ...
Virtual Event Recap: Deep Dive of Tableau Parameters For our June Lunch and Learn, we did a deep dive on parameters for our friends across Australia and Singapore. Tableau is the premier ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×

Love our blog? You should see our emails. Sign up for our newsletter!