-
1. Re: Linked Data Multiplying Result
Santiago SanchezAug 26, 2016 11:05 AM (in response to Sean McNally)
Hi Sean, welcome to the world of linking tables (a.k.a. joins)! When you are combining 2 tables via a common field, there are a few situations that may occur:
1. A row in one table matches exactly to a row in the other table (a 1 to 1 relationship).
2. A row in one table matches 2 or more rows in the other table (a 1 to many relationship).
3. A row in either table matches 2 or more rows in the other table (a many to many relationship).
In your example, sounds like we are in the second situation. If we use CASE ID as the common column, there are several rows on the [KPI Data] table that match a row in the [Data] table. That seems to be the case because each table has multiple CASE IDs by Date.
The fix depends on your data and what you are trying to do. 2 alternatives that come to mind are:
a. You may join by CASE ID and DATE, assuming the dates between the 2 tables should match.
b. You could create a calculated field and filter out duplicates. See green tabs on attached workbook for an example. [Month Matches? (Remove Duplicates)] assumes the month (not the full date) should match on both tables.
This short video may also help with some of the concepts behind joins: Join Types with Union | Tableau Software
-
Media Example.twbx 92.2 KB
-