Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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

Re: Unmatched records in Related tables

TABLE1:

LOAD Code, Description from TABLE1;

//TABLE2

LEFT JOIN(TABLE1)

LOAD Code, Price from TABLE2;


If you TABLE2 have duplicates its a problem

mahesh3k
Contributor

Re: Unmatched records in Related tables

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];