Tableau Desktop Specialist · Free Practice Question Easy
Question 23
When field names in the Union do not match, then:
-
A
Both field names are present in the Union, but contain several null values
-
B
An error is raised and both fields are dropped from the resulting Union
-
C
Only one field name is present in the Union with null values
-
D
Only one field name is present in the Union with correct values since Tableau automatically corrects field name mismatch
Reveal correct answer
Correct answer: A
Explanation
By default, both field names are present in the Union, but contain several null values!
When field names in the union do not match, fields in the union contain null values. You can merge the non-matching fields into a single field using the merge option to remove the null values. When you use the merge option, the original fields are replaced by a new field that displays the first non-null value for each row in the non-matching fields.
You can also create your own calculation or, if possible, modify the underlying data to combine the non-matching fields.
For example, suppose you have the following customer purchase information stored in three tables, separated by month. The table names are "May2016," "June2016," and "July2016."

A union of these tables creates the following single table that contains all rows from all tables.

Now suppose a fourth table, "August2016", is added to the underlying data. Instead of the standard "Customer" field name, it contains an abbreviated version called "Cust."


Reference: https://help.tableau.com/current/pro/desktop/en-us/union.htm
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
