
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Best way to join two tables
Hi, everyone.
So, Im trying to make something like this:
In one table, I have this:
TYPE | PRODUCT | COLOR |
---|---|---|
SALE | 0001 | BLUE |
CHANGE | 0001 | BLUE |
SALE | 0002 | BLACK |
And, I need to put the stock in that lines. The problem is, the table of sales have a lot of equals lines, but the table of stock have only a key(product + color) and the number of stock. If I make some join in the table, the lines will repeat and all the table will be wrong. So, Im Trying to solve this with Qlikview(analytics or something like this). Someone can help-me please?
The table of stock is:
KEY | STOCK |
---|---|
0001BLUE | 1 |
0002BLUE | 5 |
0003BLUE | 10 |
Sorry about my english.
- Tags:
- new_to_qlikview

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this:
Table:
LOAD TYPE,
PRODUCT,
COLOR,
PRODUCT&COLOR as KEY
FROM Source;
Join(Table)
LOAD KEY,
STOCK
FROM Source2;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sample for your current data:
Table:
LOAD TYPE,
PRODUCT,
COLOR,
PRODUCT&COLOR as KEY
FROM
[https://community.qlik.com/thread/205976]
(html, codepage is 1252, embedded labels, table is @1);
Join (Table)
LOAD KEY,
STOCK
FROM
[https://community.qlik.com/thread/205976]
(html, codepage is 1252, embedded labels, table is @2);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can associate the tables, just add a KEY field in the first one, Prod
Prod:
LOAD
TYPE, PRODUCT, COLOR,
PRODUCT&COLOR as KEY
FROM [https://community.qlik.com/thread/205976] (html, codepage is 1252, embedded labels, table is @1);
Stock:
LOAD
KEY,
STOCK
FROM [https://community.qlik.com/thread/205976] (html, codepage is 1252, embedded labels, table is @2);
