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

Join two tables

Hello I want to join this two lines 

HamdiGA_1-1614860535953.png

in order to get one facts Table 

HamdiGA_2-1614860586280.png

 

i tried  (join, right Join.. ), i didnt get the result that i need 
This is my script : 

FACTS_DEF_VM:
//MISSION_VM_SEQ
LOAD
//Date(@1) as DATE_MODIF_VM,
//Time(@2) as TIME_MODIF_VM,
@3 as ID_VM,
@16 as ID_MISSION_VM,
@15 as NUM_SEQUENCE,
@6 as ID_PALETTE,
@4 as ERREUR,
@8 as X,
@9 as Y,
@7 as BATTERY
FROM [lib://XPO_DEFAUTS_VM_FTP (fro1vhlqlik1_administrateur)](txt, codepage is 28591, no labels, delimiter is ';', header is 2 lines)
where @3 > 0 and Date(@1)>'$(vOldestDate)';
join
//MISSION_VM_SEQ
Load
ID_VM,
ID_MISSION_VM,
ID_MISSION,
NUM_SEQUENCE,
ID_PALETTE,
DATE_MODIF_VM,
TIME_MODIF_VM
RESIDENT MISSION_VM_SEQ;
DROP TABLE MISSION_VM_SEQ;

 

 

 

3 Replies
rbartley
Specialist II
Specialist II

Hi, 

By using JOIN, Qlik Sense will try to join on all common fields, but your two lines do not have the same value in all common fields, e.g ID_PALETTE is null in one of the lines you want to join, but has a value on the other.  Firstly, you need to identify the fields which you would like to join.

HamdiGA
Contributor II
Contributor II
Author

Actually, that's what I want to do: I want to replace the null value with the not null  ID_palette value.

when the other IDs match.

thanks

rbartley
Specialist II
Specialist II

Ok, but what if you have 2 records that both have different ID_PALETTE values?  Is that possible?