KNOWLEDGE BASE

Joining Superstore Data Results in Duplicates


Published: 20 Aug 2018
Last Modified Date: 30 Aug 2018

Issue

When joining tables Orders and Returns in the Superstore data that comes with 2018.1 and newer, the results are duplicated because the Returns table contains duplicated Order ID and is not unique.

 

Environment

  • Tableau Desktop 2018.2.0
  • Windows 10
  • Excel

Resolution

There are multiple ways to deal with duplicated data. Below are three ways that show how duplicated data can be handled at each stage:

Option 1: At the data source level

Open Superstore data in Excel and remove the duplicated data in the Returns table.

Option 2: In Tableau Prep

Use the Aggregate function in Tableau Prep to remove the duplicates in the Returns table. For more information, see Aggregate and group values.

Option 3: In Tableau Desktop

Use LODs in Tableau Desktop to remove duplicates in the results. For more information, see Removing Duplicate Data with LOD Calculations.
 

Cause

The duplicated data in the Returns table is to coincide with the release of Tableau Prep and to allow the use of the sample data to demonstrate data preparation.

 

Additional Information

The Returns table in Superstore data from 10.5 and earlier is not duplicated.

There are more scenarios and ways that Tableau Prep can be used to handle duplicated data, which can be seen in the article, Removing Duplicate Data in Tableau Prep.
Did this article resolve the issue?