Tableau Deep Dive: Sets – Computed Sets


Tableau Deep Dive: Sets – Computed Sets

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

Computed sets use logic to dynamically update the membership of the set. This is the key distinction between constant sets and computed ones. Changes to the data will change the set itself as it re-computes what gets classified as IN the set and what gets classified as OUT of the set.

Computed sets can only use a single dimension whereas constant sets might have multiple dimensions in their membership (as illustrated in part two of this Deep Dive).

Creating a Computed Set

To create a computed set, right-click on any dimension in the Data pane and select Create > Set:

Tableau, Create, Set

That brings up the criteria-based Create Set window just like we did in part two of this Deep Dive. We’ll examine the features available here in greater depth. This window gives you the ability to create criteria on how your set is computed.

Create Set window

As an example, I want to expand upon my set that I created in part two where I focused on all products by a particular manufacturer (Eldon). I will create a set from my Eldon products, focusing on the top three most profitable products that have at least $100 in sales. I want any Eldon product that is added later to be dynamically included in my set unlike the set I created in part two of this series.

To accomplish this set, I’m going to use features on the Condition and Top tabs.

First, I want to call your attention back to the Summary area. It is located at the bottom of the General tab and shows all of the different criteria I’ve constructed in building my set as well as the number of current members. Another important thing to note is that it is only here in the Summary area where you get the reminder of which dimension you’re using to create your set.

In the use case example, my dimension is Product Name:

Summary area

As we complete each step of building my sample set, I’ll return back to the Summary area to show how our changes are reflected here.

Top Tab

Let’s start by using the Top tab to select the top three most profitable products. Here are the settings I’ll use:

Top tab

I want to use the By field option to select the top three products by the sum of profit. Remember from our parameters Deep Dive, you can insert a parameter into the number value of the Top or Bottom results. Here’s how my Summary area on the General tab has updated to reflect my selection:

Updated Summary area

Clicking on the Top 3 by SUM([Profit]) blue text will take me back to the Top tab.

Condition Tab: Part One

Now let’s only select products that have at least $100 or more in sales. I’ll need to use my Condition tab to do that. I’ll use the By field option with the following selections:

By field

Moving back over to the General tab, I can see that my new criteria has been included in the logic that’s going to be used to build the set.

Updated Summary

Condition Tab: Part Two

The last component of my set is to select all products from the Eldon manufacturer. In part two, I did this using the General tab with the search option to reduce my list of products to only those that had “eldon” in their title. Creating a set in this way is not dynamic. New Eldon products would not be added. So I’ll need to go back to Condition tab and use the Formula area to do this dynamically.

Deselecting my field option on this tab is going to remove my logic I created for any product that had at least $100 in sales, so I’ll have to rewrite that condition into my formula.

Rewrite condition

I have to use MIN because I cannot mix aggregated and non-aggregated results, since sales is aggregated by SUM. Let’s take a look at our Summary area now that all of our criteria are in place to build our computed set. Note, you might have to click OK and then edit your set to see the Condition line updated here:

Updated Summary

To build our view, I’ll add SUM(Sales) and Product Name to Columns and Rows respectively. Lastly, I’ll add my new set to the Filters card:

Finished Tableau view

What’s Next?

Now that we have the tools to build both constant sets and computed sets, we’ll dig even deeper into how to use them on our visualizations, particularly with the IN/OUT options. Please leave any comments or questions in the area provided below. Always looking forward to your feedback. Cheers!

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
Kickstarting Data Innovation in Healthcare On 13 March 2024, InterWorks was a proud Platinum sponsor of the first ever Data & Analytics in Healthcare conference, hosted by ...
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 ...

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
Geschäftsführer: Mel Stephenson

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!