What is date Mis-Match in tableau?

What is date Mis-Match in tableau

What is date Mis-Match in tableau?

EXPLANATION
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 rental Patron
Date Reservation type Requester ID
1/1/2000

Individual 233445589
1/28/2002 K-12 365948999
1/29/2002 Non-profit 233448888
12/5/2002 K-12 365948999
5/5/2003 Non-profit 334015476
3/12/2004
Non-profit

334015476
3/15/2006 City 211896980
7/8/2007 K-12 334015476
1/4/2008 Individual 560495523
3/8/2009 Non-profit 233445566
2/14/2014
Non-profit

233445566
12/21/2015 Non-profit 233445566
2/10/2016 Non-profit 233445566
ID First name Last name Branch Member since Units borrowed Fees Suggested limit
454613981 Adam Davis West 2012 25 0 10
232502870 Alan
Wang

North 2000 1 0 15
298000916 Amanda Smith North 2001 54 6.4 15
233448978 Andrew Smith North 2000 36 3.50 15
233445566 Ashley Garcia South 2000 243 11.30 15
900005122 Brian Frank East 2011 12 .10 10
921491769 Elizabeth Johnson West 2010 19 .5 10
233445589 Fred Suzuki North 2000 52 .90 15
344556677 Henry Wilson South 2005 3 .2 15
939502870 Jane Johnson West 2017 0 0 10
To find out more information about new patron behavior, 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.

What is date Mis-Match in tableau

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

 

Date      Reservation type             Requester ID     ID            First name           Last name           Branch  Member since   Units borrowed            Fees      Suggested limit

1/1/2000

 

Individual            233445589           232502870           Alan       Wang

North

 

2000       1              0.00        15

1/1/2000              Individual            233445589           233445589           Fred       Suzuki   North    2000       52           0.90        15

1/1/2000              Individual            233445589           233445566           Ashley  Garcia   South    2000       243         11.30     15

1/1/2000              Individual            233445589           233448978           Andrew                Smith    North    2000       36           3.50        15

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.

What is date Mis-Match in tableau

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

 

Date      Reservation type             Requester ID     ID            First name           Last name           Branch  Joined   Units borrowed                Fees      Suggested limit

1/1/2000              Individual            233445589           233445589           Fred       Suzuki   North    2000       52           0.90        15

4.What is string Mis-match and how to resolve?

EXPLANATION

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:

 

Patron  Contact

First name           Last name           Branch  Member since   Units borrowed                Fees      Suggested limit

Alan

Wang

 

North    2000       1              0              15

Andrew                Smith    North    2000       36           3.50        15

Ashley  Garcia   South    2000       243         11.30     15

Fred       Suzuki   North    2000       52           .90          15

Name    Member number             Emergency contact         Relationship       Emergency number

Adam Davis        555-0324              Ellen Davis           Partner 555-0884

Alan Wang          555-0356              Jean Wilson        Mother                555-0327

Fred Suzuki         555-0188              Jim Suzuki           Brother                555-3188

Henry Wilson

 

555-0100              Laura Rodriquez               Partner 555-0103

Michelle Kim      555-0199              Steven Kim         Partner 555-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.

What is date Mis-Match in tableau

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.

What is date Mis-Match in tableau

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

 

First name           Last name           Branch  Member since   Units borrowed                Fees      Suggested limit Name    Phone number

Alan       Wang    North    2000       1              0              15           Alan Wang          555-0356

Fred       Suzuki   North    2000       52           .90          15           Fred Suzuki         555-0188

Leave a Reply

Your email address will not be published. Required fields are marked *