Tableau Deep Dive: Sets – Hierarchies

Data

Tableau Deep Dive: Sets – Hierarchies

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 last article in our Deep Dive on Sets, we will explore how we can use sets inside of a hierarchy. It adds dynamism to your hierarchies, particularly if you nest multiple computed sets into a single hierarchy. Let’s learn how to do it!

Hierarchy Overview

A hierarchy allows us organize different dimensions into a structure that can be expanded or collapsed inside of our view. It is very common to create hierarchies from geo-fields, such as:

Geo-Fields hierarchy

When a hierarchy like the one above is applied to a visualization, it can be expanded for additional detail. This can be accomplished by click on the + or next to each field, either in the Rows or Columns shelf, or on the column headers in the view.

Expanded hierarchy

Adding a set can greatly increase the functionality and use cases for a hierarchy. Let’s examine two different possibilities.

Use Case #1

Let’s take our example from above and add a set that evaluates whether a state is a mature market (200 or more customers) or a target market (less than 200 customers). To start, I’ll right click on State and select Create > Set. Here’s how we’ll construct our set using the Condition tab:

Create Set Condition

Our states that are mature markets will be IN our set, while those with few customers will be the OUT of the set. Now let’s insert our Markets set into our Geo-Field hierarchy. We can do this just like any other field, by dragging it to the hierarchy and positioning the black bar in the order in which we want it:

New Geo-Field hierarchy

Remember, our Markets set is based on a logical condition. It will update the IN membership as the data changes. Here’s how the set looks when added to the view. I’ve changed the IN and OUT aliases to match our logic (i.e. Mature Market for IN and Target Market for OUT).

Set appearance in the view

Use Case #2: Nested Sets

Now we will add another set to nest into our Geo-Field hierarchy. In addition to understanding our mature markets (200+ customers) and target markets (>200), I also want to designate which markets have improved on the previous years’ sales. I’ll designate these are Growing (IN) as opposed to Declining (OUT). I’ll call my set Status and create a logical condition based on the last two years of my data source’s data (2012 and 2013):

Add another set

I’ll now slot my Status set into my Geo-Field hierarchy between Markets and State:

Final Geo-Fields hierarchy

Now let’s add our updated hierarchy to our view showing the sum of sales. I’ve changed the IN and OUT aliases for my Status set to instead read Growing or Declining.

Final view

Remember, both of my sets (Markets and Status) are computed. So, if the data changes, so will the structure of this table.

What’s Next?

This is the end of our Deep Dive on Sets. Be sure to check back on the InterWorks blog for more content on how to use Tableau Desktop and Server from our team of consultants. Also, I’d love to hear your questions or thoughts in the comments section below.

And here’s to always having great sets! 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
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!