Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join tables

Hi,

Im loading data from two sources as per below.

Need the data in one table only. What would be the easiest way?

In my data a value for VOLUME alsways has a corresponding RATE value.

Source 1.

Month1,
QuarterYear,
QYear,
Type,

Volume

Source 2.

Month1,
QuarterYear,
QYear,
Type,

Rate

3 Replies
Gysbert_Wassenaar

If you want to join the tables you can use the join keyword

LOAD

     Month1,
     QuarterYear,
     QYear,
     Type,

     Volume

FROM ....

join

LOAD

     Month1,
     QuarterYear,
     QYear,
     Type,

     Rate

FROM ...

But you could also concatenate the tables instead of joining them. In that case use CONCATENATE instread of JOIN.


talk is cheap, supply exceeds demand
puttemans
Specialist
Specialist

I would suggest a mapping approach.

map_Rate:

MAPPING LOAD

     Month1&QuarterYear&Qyear&Type,

     Rate

FROM Source2

100:

LOAD

     *,

     Applymap('map_Rate', Month1&QuarterYear&Qyear&Type) as Rate

FROM Source 1

This will add the rate info for each combination of 'Month1&QuarterYear&Qyear&Type' that is similar in your Source 1.

Regards,

johan

sasiparupudi1
Master III
Master III

QUALIFY Month1,QuarterYear,QYear,Type;

Source1:

load

* ,Month1&QuarterYear&QYear&Type as Key

Inline

[

Month1,QuarterYear,QYear,Type,Volume

];

Source2:

load *,Month1&QuarterYear&QYear&Type as Key

Inline

[

Month1,QuarterYear,QYear,Type,Rate

]