Managing Data Relationships in Tableau

Set up your data in Tableau by importing the main table first, previewing and verifying fields and data types, creating relationships with additional tables using matching field names, hiding unnecessary columns, and preparing for analysis.

Learn how to efficiently bring data into Tableau, preview its structure, and establish meaningful relationships between tables for accurate analysis. This article walks through key steps including field verification, data type management, and best practices for building a data model.

Key Insights

  • When importing data into Tableau, users can preview each table before use—such as verifying the 9,994 rows in the Orders table—to ensure accuracy and prevent mistakes in selecting the wrong dataset.
  • Establishing relationships between tables, like linking the People table to Orders using the shared "Region" field, mirrors SQL-style joins and is essential for combining related data for analysis.
  • Noble Desktop explains how Tableau assigns and displays data types visually using color-coded cues—blue for dimensions and green for measures—and emphasizes best practices like hiding unused fields and manually adjusting data types when needed.

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.

All right, so now that we've done that, what do you do after you bring it in? You'll notice on your left, you should have orders, people, and returns. Before you start to work with the information, maybe you wanna check it out. Maybe you didn't look at the spreadsheet like we did before.

So I'm gonna go back to Tableau, and over on the left, you'll see Sheets. Sample Superstore sales data is the connection. You are allowed to connect to multiple data types.

That's why you have Add. You can add in another spreadsheet. You can even do something called Union, where you combine similar structured data and append one to another.

We're not gonna do anything complicated like that. We're gonna do just the simple Superstore sales data. I'm gonna close this.

Now, I wanna preview this information, so I'll go over here and click this little button. Oh, look at that. I can actually look at my data before I bring it in.

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.

Also, right here, it tells me I have exactly 9,994 rows within 21 fields. So I can verify, does this look right? Because before I bring the data in, I wanna make sure I selected the right file. Maybe I selected the wrong one.

I'm gonna close this. I'll click the other little button here next to People. My, that's a really small table.

They tell me exactly four rows and two fields. Okay, this is gonna be useful when we want to connect this to the orders. There is a common field for the People table and the Orders table.

This was just another sheet in Excel, but now that I brought it into Tableau, it's gonna be a table. I'm gonna close this. I'll take a look at the last one, Returns.

This Order ID connects to the Orders ID in the Orders table. It's gonna create a relationship almost like SQL Server connects tables together. So let's go through the process of connecting this information.

They tell you, drag tables to create a data model. So I'm gonna take Orders, because that's the primary table. I'm gonna drag it into this canvas area, just right here, and I'll let go.

Just like that, it displays the information. This is a list of all the fields, and you can see the little symbols that tell you the data types. The difference between Tableau and Excel, Excel, you don't have to worry about data types.

Any column can be any kind of data type. Here, they actually say, no, this is a date, and this is the data type we're gonna use for this. We can treat it differently.

This is text. This is a geocode. This relates to geocode information that we could use when we're creating maps.

And so it's already starting to do that work for you. If there are certain fields you don't wanna use, you can hide them. So Row Field is an arbitrary field that I really don't need.

If I click this little dropdown here or right-click, I have an option to hide that, and I'll hide it. If I wanna bring it back because I made a mistake, there's this little gear icon that I can click here, and then I can choose Show Hidden Fields. Now that I've brought this table in, I instantly see, now they're talking to me about making relationships.

The little icon that was here before has disappeared, and now they want me to know, they wanna know, do I wanna select any of these additional sheets to bring into the table? Now I wanna create a relationship between people and orders. So what I'm gonna do is I'm gonna take people, and I'm gonna move it over to the right of orders. And when I see that little line, that is a relationship that's being created.

When I let go, there it is. Now I see the information in that people sheet or table, but here is the connection. For those of you familiar with SQL, this is what the tables are being joined on, region and region, and that's the connection between these two tables.

If there was a mistake, I could go here and change it, but because the fields are spelled exactly the same, it already made the connection, and it lets me know that region is from people, and this region is the original region, so I can tell which is which. I have another relationship I wanna create, so that's returns. Don't drag a field and put it on the same level, or else you're gonna say, this is a base table.

It's not a base. The base is orders, so I need to move it over to the right of orders, and now I've established a relationship there as well. This is the main table, and then these are the two connections.

I'll click on orders, and when I click on orders here, if the fields are not in the format that I want them to be, I can click here, and I can choose a different data type. So here, I'm allowed to see all the different data types that are available. I could right-click.

If I decide this is a geographic field, I can go and change it. This is something you'll have to do if the data is not formatted in a way that Tableau can recognize, but because we know this data has been vetted, we don't have to worry about changing everything, anything. Everything is already set up the way it should be.

Any questions? So at this stage, you should have orders, people, and returns. What we did here, you could also do in the online version. So let's catch up to where we're at.

In my PowerPoint, I talk about looking at the fields, examining them, making sure they're accurate. You can work with multiple worksheets. When working with multiple connections, always drag the main sheet first, in this case, orders.

Drag additional sheets into the work area, but to the right of the main sheet. Tableau will automatically attempt to figure out the connecting field between the sheets. Names must be the same, or you'll have to manually assign them.

So I try to write all this out step-by-step. I don't wanna tell you stuff that you have to memorize that is not written down. So step-by-step, I'm just documenting what I just did.

Review the columns and the field data types. Unlike Excel, the fields have specific data types. I hid the row ID field.

That is something you could do. You could do it here, or you can do it in the new sheet that we're gonna be working in. Color differentiates the different dimensions and measures.

If you look here, you'll see there's a slight color of blue and green, and this tells you the different data types. So the numbers here are green. This is where I'm first starting to see that it's green.

Everything else is blue, and you're gonna see that when we go into the sheet. Important, if you're doing this online, you must click Extract for the online version. If there's another step for you to make, to bring the information in, in the upper right-hand corner, you're gonna see an Extract option.

I hid the columns. You could rename the fields and not worry that it's gonna rename the original information. If you decide there's a better name that you wanna use for a field in Tableau, you can rename it.

Dimensions are blue, measures are green. Yes, we did cover that, but you can't change the data. Changing the data type, I talked about that as well.

Just right-click, and you can choose different data types. Setting up your data, preview your data, clean up using Data Interpreter, bring the main table first, create a relationship, click on the relationship line to view the relationship if you want. Orders are on the side, people and returns on the right.

Hide or edit fields. Next section, we're gonna talk about the Tableau interface.

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