Review Join Results in the Data Grid

After you have created a join on the canvas, review the data grid to make sure the join produces the results that you expect. If the data grid displays data that you don't expect, you might need to modify the join.

Results in the data grid

  • No data: If no data displays in the data grid, you might need to change the join type or a join field used in the join condition. If you suspect a mismatch between fields in the join, use a calculation instead. For more information, see Use calculations to resolve mismatches between fields in a join.

  • Duplicate data: If you see duplicate data, there a few things you can do. Consider relating the tables instead of joining. For more information, see Relate Your Data(Link opens in a new window).

  • Missing data: If some data is missing from the data grid, you might need to change the join type or a join field used in the join condition. Again, if you suspect a mismatch between fields in the join, use a calculation instead. For more information, see Use calculations to resolve mismatches between fields in a join.

  • Many null values: If you see many null values that you do not expect, you might need to change the join type from the full outer type to the inner type.

  • All null values for one table: If all values for one table is null, there are no matches between the tables that you are joining. If this is not expected, consider changing the join type.

Use calculations to resolve mismatches between fields in a join

When the fields in a join condition don't match – that is, a mismatch between the values in the fields used in a join condition, the data grid can show little or no data at all. A mismatch between fields can occur for several reasons but often caused by the differences in format of the string values or date values in the fields. In many cases, you can resolve mismatches between the fields in your join by using a calculation.

Most functions are available for you to use in a calculation to create and replace a field in the join condition, with the exception of aggregate functions and table calculation functions.

Note:Join calculations are not supported for QuickBooks Online, Marketo, Oracle Eloqua, Anaplan, ServiceNow ITSM and web data connectors.

String mismatch

A common mismatch scenario when working with string data occurs when one of the fields on one side of the join condition is equivalent to two or more fields on the other side of the join condition. In this case, you can use a calculation to combine the two fields so that its format matches the other field in the join condition.

For example, suppose you want to join two tables that contain the following data:

PatronContact
First nameLast nameBranchMember sinceUnits borrowedFeesSuggested limit
Alan

Wang

North20001015
JohnSmithNorth2000363.5015
AshleyGarciaSouth200024311.3015
FredSuzukiNorth200052.9015
NameMember numberEmergency contactRelationshipEmergency number
Adam Davis555-0324Ellen DavisPartner555-0884
Alan Wang555-0356Jean WilsonMother555-0327
Fred Suzuki555-0188Jim SuzukiBrother555-3188

Henry Wilson

555-0100Laura RodriquezPartner555-0103
Michelle Kim555-0199Steven KimPartner555-0125

The common fields between the two tables appear to be name. However, in the Patron table the first and last names are in separate columns and in the Contact table the first and last names are in the same column. To join the tables on names, you can use a calculation in the left side of the join condition to merge the first name and last name columns together.

The result is a calculated field on the left side of the join condition that is accessible only from the join dialog. This calculation converts the field in the Patron table into a format that now matches the format of the field in the Contact table on the right side of the join condition.

Using the calculation in the join produces the following combined table: 

First nameLast nameBranchMember sinceUnits borrowedFeesSuggested limitNamePhone number
AlanWangNorth20001015Alan Wang555-0356
FredSuzukiNorth200052.9015Fred Suzuki555-0188

Date mismatch

A common mismatch scenario when working with date data occurs when the date values in one field of the join condition are captured at a different level of detail than the other field in the join condition. In this case you can use a calculation in the join condition to change the format of the field on one side of the join condition so that its format matches the other field in the join condition.

For example, suppose you have the following two tables of data:

Projector rentalPatron
DateReservation typeRequester ID

01/01/2000

Individual233445589
28/01/2002K-12365948999
29/01/2002Non-profit233448888
05/12/2002K-12365948999
05/05/2003Non-profit334015476
12/03/2004

Non-profit

334015476
15/03/2006City211896980
08/07/2007K-12334015476
04/01/2008Individual560495523
08/03/2009Non-profit233445566
14/02/2014

Non-profit

233445566
21/12/2015Non-profit233445566
10/02/2016Non-profit233445566
IDFirst nameLast nameBranchMember sinceUnits borrowedFeesSuggested limit
454613981AdamDavisWest201225010
232502870Alan

Wang

North20001015
298000916AmandaSmithNorth2001546.415
233445566AshleyGarciaSouth200024311.3015
900005122BrianFrankEast201112.1010
921491769ElizabethJohnsonWest201019.510
233445589FredSuzukiNorth200052.9015
344556677HenryWilsonSouth20053.215
939502870JaneJohnsonWest20170010
233448978JohnSmithNorth2000363.5015

To find out more information about new patron behaviour, joining the Patron table to the Projector Rental table might provide some insight about which library services motivate new memberships. The common fields between the two tables appear to be "Date" and "Member since". However, the date values in each field are captured at different levels of detail. To join these tables on their respective date fields, use a combination of DATE functions in a calculation on each side of the join condition to make the level of detail in each field match.

DATE(DATETRUNC('year', [Date]))

DATE('01/01/'+STR([Member since]))

Using the calculation in the join produces the following combined table:

DateReservation typeRequester IDIDFirst nameLast nameBranchMember sinceUnits borrowedFeesSuggested limit

01/01/2000

Individual233445589232502870AlanWang

North

200010.0015
01/01/2000Individual233445589233445589FredSuzukiNorth2000520.9015
01/01/2000Individual233445589233445566AshleyGarciaSouth200024311.3015
01/01/2000Individual233445589233448978JohnSmithNorth2000363.5015

To determine if a patron rented the projector in the same year he or she started his or her membership, add one more clause to the join based on ID.

The result of the additional join condition shows that only one patron might have started his membership to rent a projector.

DateReservation typeRequester IDIDFirst nameLast nameBranchJoinedUnits borrowedFeesSuggested limit
01/01/2000Individual233445589233445589FredSuzukiNorth2000520.9015