Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

Linking tables question

Hi all,

I have a question because now i'm blocked. I have a document that analyze the sales from my company. This analysis is made itemid by itemid and with a calendar...

Now I have a Stock evolution with a daily  snapshot itemid by itemid.

I want to see the sales analysis and see wich was the stock situation by this date, and I don't know how to put the stock data in the document.

See the structure attached

Many thank's guys

16 Replies
PradeepReddy
Specialist II
Specialist II

can u post sample data/App, so that it would be easy to suggest a solution...

ecabanas
Creator II
Creator II
Author

Hi Avinash

Yes you are right, the query did not work as you mentioned

Digvijay_Singh

I think you can give one try by creating composite key of itemId and Date in both Salesline and Stock, give same name in both tables so they will be link, remove ItemId from stock or rename it to different name to avoid synthetic key.

And then left join(salesline) with stock table, so you will have all the records of stock which are present in Salesline.

avinashelite

you need have the date formats in the same format ...could you please share the script how your linking the tables ??

you can set the date format using the date() function

like Date(date_field,'DD-MM-YYYY')

ecabanas
Creator II
Creator II
Author

Hi Digvijay

Yes, you are right, but I want to see all my stock available, the units and if it has been or not sales, your proposal is very nice but erase all the stock units not sold...

WOW it's a very complicated problem.

many thank's for  your help

Digvijay_Singh

Then don't join and just create the link as I suggested, see if it serves the purpose.

stabben23
Partner - Master
Partner - Master

Hi, have a look at this document: Generating Missing Data In QlikView. Maybe you should try to generat all dates in month so you get the same value on each row in Your Stock table.