MHierarchy Techniques in Tableau

Create hierarchies in Tableau by grouping related fields (e.g., Country, State, City, Zip) to simplify the sidebar and enable expandable visualizations.

Learn how to streamline your Tableau workspace by creating data hierarchies that simplify your sidebar and improve visualization efficiency. This article walks through organizing fields like country, state, and city into expandable hierarchies and using naming strategies to prioritize key data elements.

Key Insights

  • Hierarchies in Tableau allow users to group related fields—such as country, state, city, and postal code—into collapsible structures to reduce sidebar clutter and simplify data navigation.
  • Users can create hierarchies either by selecting "Create Hierarchy" from a dropdown menu or by dragging one field onto another, then renaming the hierarchy for clarity, such as naming a group of category and subcategory fields as "Products."
  • Noble Desktop’s training highlights practical tips like using prefixes (e.g., “1-” or “2-”) or symbols (e.g., asterisks) to float frequently used hierarchies to the top of the sidebar for quick access during analysis.

Note: These materials offer prospective students a preview of how our classes are structured. Students enrolled in this course will receive access to the full set of materials, including video lectures, project-based assignments, and instructor feedback.

Organizing the data on your sidebar. I have three basic topics to go over here, which is brand new information that I've not shown you. So get ready.

This is a totally new concept, something you should know when you're working in Tableau. The data that you're gonna work with, you just have to find different ways of slicing and dicing it. That's the term I'll use because basically that's what you're doing.

Hierarchy, that's our first topic. Hierarchy is very simple. Again, if I say something that doesn't make sense, just let me know, but this should be very simple.

In Tableau, hierarchies are level-based arrangement of data, much like a flowchart. Hierarchies group data fields into different layers. There are certain fields that could be grouped together.

What's an example? Country, state, city, zip. Why would we group them? Because you have a lot of fields and you may experience data overwhelm. What if you could group them all together into one field that you can expand or collapse? That's the purpose of hierarchy.

Tableau Bootcamp: Live & Hands-on, In NYC or Online, Learn From Experts, Free Retake, Small Class Sizes,  1-on-1 Bonus Training. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

One of its main purposes is to help you organize the sidebar so you don't have as many fields. And this will eventually help you with your visualizations. So there's a couple of ways to create a hierarchy.

So let's take a look at something we could create a hierarchy for. And let's do that for, I have an example here where we're using country. I'm just checking to see if I wanna go over that.

Yeah, let's do country. So I'm gonna go over to country and I wanna create a hierarchy. I'm gonna click the dropdown here.

I'm gonna head over to create. It's not gonna be in create. That's one of the places I go to.

It's gonna have the other topics we're gonna cover today. You're gonna go to hierarchy and you're gonna click create hierarchy. And then you don't wanna call this country because country is going to be one of the values underneath this greater hierarchy.

So for this exercise, we say location. I'll click okay. Location is above country.

Now what comes underneath country? I'm gonna choose state. It's also a geographic field. I'm gonna drag it and put it right underneath country.

Then the next thing I wanna use is city. I'm gonna take city. I'm gonna move it right under state.

Postal code, which I think should be called zip code. I'm gonna go over here and I'll put it right underneath city. Now all these fields are grouped together.

I don't have as many fields. I have four fewer fields. It's less overwhelming.

I can open this up and see the detail for the location. So that is an example of creating a hierarchy in your sidebar. And this is exactly what we did here.

You can also do this with products. In this case, category and subcategory. We're not gonna use location.

We're gonna call category and subcategory products. So here's another way to do this. You can drag and drop.

So what do you mean? The thing I don't like about category and subcategory is they're so far apart from each other. So I'm gonna take subcategory. I'm gonna drag it and put it on top of category.

When I let go, that automatically creates a hierarchy. And now I'm gonna give it a name. And the standard name we would give to this is products.

When I click okay, I now have products and there's category and subcategory. Now, the thing I don't like about this is this is supposed to help me organize my fields. Products is down here.

I had category up on top and location is here. So guess what? You are allowed to rename your products. I'm gonna, let's say products is primary for me.

I'll just type in one dash. And when I press ENTER, it floats to the top. If you wanna be able to do your work quickly, you wanna be able to have quick access to your fields.

So location, maybe I wanna put that in the second place. I can also rename that or just double click and I'm gonna type two dash. I'll press ENTER.

And then now I have the main two fields that I use to organize my location and products right at the very top. So you can use other symbols like asterisk or dashes. They automatically float to the top.

Just curious, why would you want to do that? Well, now when I work with my visualizations, category has a little minus sign here. So what can I do with this now that I have a hierarchy? When I click the minus sign on category, I can collapse or expand the information I display. This makes it easier for me to work with my visualizations.

I don't now have to go and drag subcategory into next to category because now it's in a hierarchy. And so you can use this to expand or collapse the information that you're working with. That's one reason, there are other reasons, but that's the main reason.

Helps you organize your sidebar and work with your visualizations. If I want, I could put product name in there, but that would be too much. You'll get what we had here, which we already did.

Garfield Stinvil

Garfield is an experienced software trainer with over 16 years of real-world professional experience. He started as a data analyst with a Wall Street real estate investment company & continued working in the professional development department at New York Road Runners Organization before working at Noble Desktop. He enjoys bringing humor to whatever he teaches and loves conveying ideas in novel ways that help others learn more efficiently.

Since starting his professional training career in 2016, he has worked with several corporate clients including Adobe, HBO, Amazon, Yelp, Mitsubishi, WeWork, Michael Kors, Christian Dior, and Hermès. 

Outside of work, his hobbies include rescuing & archiving at-risk artistic online media using his database management skills.

More articles by Garfield Stinvil

How to Learn Tableau

Master Tableau with Hands-on Training. One of the World’s Most Popular Data Visualization Tools, Tableau Allows Users to Create Graphs, Charts, and Other Illustrations to Share Their Analytical Findings.

Yelp Facebook LinkedIn YouTube Twitter Instagram