0
votes

I have two sheets in excel. One has CBG (neighborhood) IDs as shown below.

CBG IDs

The second sheet has state and county names and IDs as shown below.

state and county data

Now the first 5 digits in the CBG ID are just the corresponding state and county IDs for that CBG.

I need to to join this data together in Tableau so that I would have the state and county on the CBG sheet for each CBG.

Basically I tried to blend the data and it didn't work. I also tried to perform a join calculation using the 5-digit code in the second sheet and the LEFT function to extract the 5-digits in the CBG code but it didn't seem to work either.

2

2 Answers

0
votes

To fix it, just needed to fix the Join calculation on both sides of the join.

Also, it seems that both variables to be joined need to be the same data type.

0
votes

The data that you analyze in Tableau is often made up of a collection of tables that are related by specific fields (that is, columns). Joining is a method for combining the related data on those common fields. The result of combining data using a join is a virtual table that is typically extended horizontally by adding columns of data. When joining tables, the fields that you join on must have the same data type. If you change the data type after you join the tables, the join will break.

Please go through the below steps for joining tables:

  1. In Tableau Desktop: on the start page, under Connect, click a connector to connect to your data. This step creates the first connection in the Tableau data source.

In web authoring: Select New Workbook and connect to your data. This step creates the first connection in the Tableau data source.

  1. Select the file, database, or schema, and then double-click or drag a table to the canvas.

  2. Double-click or drag another table to the canvas, and then click the join relationship to add join clauses and select your join type.

  3. Add one or more join clauses by selecting a field from one of the available tables used in the data source, a join operator, and a field from the added table. Inspect the join clause to make sure it reflects how you want to connect the tables.

  4. When you are finished, close the Join dialog.

Thank you.