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:
If you perform a join in Tableau with this data, you’ll end up with two disjointed “Day” fields.
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.
Here’s the result:
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:
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 email@example.com.