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

Unmatched records in Related tables

Hi!

I have two tables that are automatically related in Qliksense by 2 fields with the same name.

Not all the keys in the first table have a related record in the second one.

I'm trying to build a table that shows all the records of the first table with its fields plus the fields of the second table that match the key or leave the field empty otherwise.... However, what I get is a table that only shows the records whose key matches (the resulting table has less records than de original first table).

For example:

Table 1

CodeDescription
AProduct A
BProduct B
CProduct C

Table 2

CodePrice
A1000
C

150

The resulting table should be:

CodeDescriptionPrice
AProduct A1000
BProduct B
CProduct C150

If possible, I'd like to avoid using join/keep in the script editor, because the second table is a kind of weird concatenations of tables.

Thanks!!

2 Replies
Not applicable
Author

TABLE1:

LOAD Code, Description from TABLE1;

//TABLE2

LEFT JOIN(TABLE1)

LOAD Code, Price from TABLE2;


If you TABLE2 have duplicates its a problem

maheshkuttappa
Creator II
Creator II

MAPTable:

Mapping Load

*;

LOAD * INLINE [Code,Price

A,1000

C,150];

Table1:

Load

*,

ApplyMAP('MAPTable',Code,null()) as Price;

LOAD * INLINE [

Code,Description

A,Product A

B,Product B

C,Product C];