Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik experts.
I've been really struggling trying to join date fields from two different tables. The month and year are also reported in separate columns. Please advise how to join these two in the load script.
Table 1 | Table 2 | |||||||
Market | Month | Year | Purchased | Market | Month | Year | Resold | |
A | Jan | 2019 | 20 | A | Jan | 2019 | 15 | |
B | Feb | 2019 | 25 | B | Feb | 2019 | 35 | |
C | Mar | 2019 | 30 | C | Mar | 2019 | 15 |
Thanks
little confused. i am assuming 1 table is
Market | Month | Year | Purchased |
and the other is
Market | Month | Year | Resold |
you can do a simple join between these tables it will consider all columns which are common between the 2 tables and use that for joining
MainTable:
LOAD
Market,
"Month",
"Year",
Purchased
FROM [lib://Downloads/Community.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);
inner join (MainTable)
LOAD
Market,
"Month",
"Year",
Resold
FROM [lib://Downloads/Community2.csv]
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);
result
little confused. i am assuming 1 table is
Market | Month | Year | Purchased |
and the other is
Market | Month | Year | Resold |
you can do a simple join between these tables it will consider all columns which are common between the 2 tables and use that for joining
MainTable:
LOAD
Market,
"Month",
"Year",
Purchased
FROM [lib://Downloads/Community.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);
inner join (MainTable)
LOAD
Market,
"Month",
"Year",
Resold
FROM [lib://Downloads/Community2.csv]
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);
result
Great. Thanks. Worked like a charm!