How to Combine Multiple Fields in a Tableau Join

Pro Headshot.jpg

By: Eric Parker

Eric Parker lives in Seattle and has been teaching Tableau and Alteryx for 5 years. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email.

Imagine you are living your best life and run a company that owns an ice cream parlor and a chocolate store. You have data for both companies that looks like this:

30-1.png

If you perform a join in Tableau with this data, you’ll end up with two disjointed “Day” fields.

30-2.png

If you performed a standard join, you can select the headers of the two fields you want to merge and select “Merge Mismatched Fields”. When you perform that operation, any nulls in the left column will be replaced with values from the right column. If there was already a value in the left column, it defaults to that.

30-3.png

Here’s the result:

30-4.png

Depending on the data source you are using, “Merge Mismatched Fields” might not be an option. In that case you can write a calculation to perform this task:

30-5.png

The above approach is also helpful if you have more than two fields you are trying to combine. You can use nested IFNULL statements.

 

Need more help?  Please contact us at freesupport@onenumber.biz.

Tableau - “Cannot mix aggregate and non-aggregate comparisons or results in ‘IF’ expressions.”

Tableau Table Calculations - What Does “Specific Dimensions” Mean?

0