Sometimes, when you are building views in Tableau, a field will have multiple members with the same name. For example, you may have a view showing the average profit by month over several years. The month January appears multiple times (once for each year).
While the name, January, is repeated, each instance of January can either be considered similar or unique. If you consider them similar, they will appear in the same column if you decided to move the Year field to the Color. However, if you consider them unique, they will be treated as two different values.
It is generally okay to consider repeated names within date and time fields (like in the previous example) similar but if there are repeated names in the Customer Name field, you won’t want to consider the two customers as the same person.
To define how you want Tableau to determine whether repeated values are unique, right-click on the dimension and select one of the following on the Unique Values context menu:
By Key: each member is considered unique based on the
key given it by the system administrator when the database is set
up. Members with the same name but different keys are treated as
By Name: each member is considered unique based on the member
name. Members with the same name (regardless of their keys) are
treated as if they are the same.