the native QlikView priniciple is to join the tables by the two fields company name and item id by itself.
Then you will get a synthetic key, which is not fine in QlikView.
So you have to edit the loading script to
[company code]&[item id] as ccii
as a new key field in both tables.
For a singel selection hold the company code and the item id in one table (prefer the table that includes all datas).
So you will have one key field between both tables and can select all datas.
I think you need to load some thing like this
[Company Name]&'-'&[Item Id] as CID
(ooxml, embedded labels, table is Sales);
[Company Name]&'-'&[Item Id] as CID,
(ooxml, embedded labels, table is Purchase);
See the attached sample file.
SalePurchase.qvw 119.2 K
I guess it depends on what you want to graph. The suggestions above will only link the companies that have both sold someting and purchased something and that is probably not what you want.
One option is to do a concatenate load.
'Sales' as RecordType, //this field could be used a dimension on your graph
SalesDate as TransactionDate, //Assuming you have a date there. Creating a common date field
QTY as QtySold
'Purchase' as RecordType,
PurchaseDate as TransactionDate,
Value as QtyPurchased,
The resulting table will have all the companies and id's listed.
RecordType, Company Name, Item Id, TransactionDate, QtySold,QtyPurchased