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

issues on joining tables

Hi , 

I need to create calculated values from different tables. my source is an API 

I joined all the needed tables and I am receiving a result  but this result is not related correctly to the rest of the data . I can't filter it.

  What have I done wrong ? 

HISTORY1 :
LOAD

[__KEY_body] ,numero
resident body;
join load [__KEY_body] , [__KEY_sections]
resident sections ;
join load

[submittedDate],
[__KEY_sections]
resident statistics ;
join
load
[__KEY_history] , [__KEY_body] , [createdOn]
resident history ;

join
load [__KEY_history] ,[__KEY_summary]
resident summary ;

inner join
load [__KEY_summary],
[from],
[to]
resident status ;


FinalResult:

load

date(If([to]like 'granted' and [to] <> from ,createdOn)) as [grantedDate]

resident HISTORY1;

issue.PNG

1 Reply
Marcos_rv
Creator II
Creator II

hat inner is filtering the records of the table, you could use left join, then the last table is not what you do.

I advise you that to the "join" statement, you add the name to the table to which you join,
for example :

HISTORY1:
LOAD
[__KEY_body], number
resident body;
join (HISTORY1)
load [__KEY_body], [__KEY_sections]
resident sections;

join (HISTORY1)
load
[submittedDate],
[__KEY_sections]
resident statistics;

join (HISTORY1)
load
[__KEY_history], [__KEY_body], [createdOn]
resident history;

join (HISTORY1)
load [__KEY_history], [__ KEY_summary]
resident summary;

inner join (HISTORY1)
load [__KEY_summary],
[desde],
[to]
resident status;