Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Sagarm35
Contributor
Contributor

Inner Join issue

Hello guys,

I am facing this inner join issue whenever on two tables it is creating duplicates 3 times each row following is the script

GMB:
Buffer LOAD
"Patient Name",
"Visit Number",
PID,
"Patient Number",
"Bill Date",
"Test Code",
"Test Name",
Segment,
"Org Name",
MRP,
"Discount Amount",
OrgAddress.Location,
Quantity,
"Total Discount",
"Patient Contact Number",
Age_bucket,
Gender
FROM [lib://AttachedFiles/Part 2.xlsx]
(ooxml, embedded labels, table is Sheet1);

Inner Join(GMB)
LOAD
"IVR Id",
"IVR Title",
did,
"Caller Number",Right("Caller Number",10) as "Patient Contact Number",
Operator,
Circle,
"Call Type",
"Call Start Date",
"Time",
"Call End Date || Time",
"Call Duration",
"Insert Date || Time",
"Bunch Id",
"Start"
FROM [lib://AttachedFiles/GMB.xlsx]
(ooxml, embedded labels, table is view_53053970_i_report_9635_0_l);

 

The output of some rows are duplicates 3 times please help me to resolve the issue.

Labels (1)
  • joins

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

i would say the 2 data sets do not have 1 to 1  or 1 to many relationship. i.e. a many to many which can cause duplicates

 

you need to check that

Sagarm35
Contributor
Contributor
Author

yes some keys are repeated but the rest column value contain it are different.  As key are Mobile number which is the only common thing in table. any suggestion how can I reduce duplication?