Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Catch up on the newest Qlik features and improvements: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
MS90
Creator
Creator

In Straight table getting duplicate values

I'm loading dimensions from various tables, however there are duplicate values because of a field in one of the tables. how to keep a straight table free of duplicate.

 

IMG_20230817_213940581~2.jpg

Although SoldQRcode and Sold I'd are unrelated, SoldQRcode is making duplicates

After loading data in QS Straight Table    
Barcode(Keyfield) Name Country Sold QR Code Sold Id
1 Gold Canada A1 100
1 Gold Canada A2 101
1 Gold Canada A3 102
1 Gold Canada A1 103
1 Gold Canada A2 104
1 Gold Canada A3 105
2 Diamond Dubai B1 201
2 Diamond Dubai B1 202
3 Silver Aus C1 301
3 Silver Aus C2 302
3 Silver Aus C1 303
3 Silver Aus C2 304
4 platinum Uk D1 401
4 platinum Uk D1 402
         

 

Excepting output in below format

Table    
Barcode(Keyfield) Name Country Sold QR Code Sold Id
1 Gold Canada A1 100
1 Gold Canada A2 101
1 Gold Canada A3 102
1 Gold Canada   103
1 Gold Canada   104
1 Gold Canada   105
2 Diamond Dubai B1 201
2 Diamond Dubai   202
3 Silver Aus C1 301
3 Silver Aus C2 302
3 Silver Aus   303
3 Silver Aus   304
4 platinum Uk D1 401
4 platinum Uk   402
2 Replies
martinpohl
Partner - Master
Partner - Master

Hi,

your keyfield is A_Barcode, so with left join 1 you'll get all Sold QR Code" linked by this field and with the second left join you'll get all Sold id linked by A_Barcode. For your expected result Table C also needs a field Sold QR Code.

In you example, 1 as C_Barcode and Sold id 100 needs A1 as Sold QR Code.

Regards

MS90
Creator
Creator
Author

In you example, 1 as C_Barcode and Sold id 100 needs A1 as Sold QR?? Need to create new columns in temp table ??