Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Code | Description |
---|---|
A | Product A |
B | Product B |
C | Product C |
Table 2
Code | Price |
---|---|
A | 1000 |
C | 150 |
The resulting table should be:
Code | Description | Price |
---|---|---|
A | Product A | 1000 |
B | Product B | |
C | Product C | 150 |
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!!
TABLE1:
LOAD Code, Description from TABLE1;
//TABLE2
LEFT JOIN(TABLE1)
LOAD Code, Price from TABLE2;
If you TABLE2 have duplicates its a problem
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];