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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anku
Creator
Creator

Need Help in Scripting

Hi all, I have two datasets and there is no common key between them. I have tried to create a composite key.

For more detail, I have attached the qvf. Kindly refer attached and assist. Do suggest if you have a better way of doing it.

Brief:

Anku_2-1657200363788.pngAnku_3-1657200390841.png

In QVF, There is a Shops' stock data as well using which we have to assign order matching details like Product( same as Merchandise in Stock dataset),Sub_Category( Same as Variant), Brand( Same as Make), Product_Color( Same as Description)..

I have listed my queries in qvf file as well.

Labels (1)
7 Replies
edwin
Master II
Master II

you appear to have created a single table from 2 data inputs.  i dont think i understand what the problem is

maybe if you articulate what it is you are having difficulty with someone can help

edwin
Master II
Master II

i disabled the transform and just loaded your 2 data sets:

edwin_0-1657202156819.png

 

i think your order data is lacking a key to the product - it couldnt be possible that the order is for a category of product.  you cant possibly order RED clothing as there may be multiple products with these criteria.  your provisioning wont be able to determine what product to send.

you will need to get more info for the orders that links it to the product.  

however, if this is really working someone  must know how to relate the order to the product - perhaps a combination of attributes which are present in both order and product.  you can concatenate those and assign the same field name in bothe tables and you dont need to combine them into a single table

Anku
Creator
Creator
Author

Thanks for having a look. 

I have 2 tables, one is Orders placed and another is outlet stocks. 

As we don't have any common key so I joined the orders specifications and to make them unique I created a running count of the joined specifications.  I did the same with stocks data. 

Now I applied a join with the help of newly created keys. It will help me to provide the common data from stocks. 

 

What I am looking for is a way using that I can check that the orders received to a outlet is available (as per their complete specifications) and if it is available then it should get assign and deliver as per booking date.

 

edwin
Master II
Master II

can you pls post some sample data or at least the table structure?

edwin
Master II
Master II

i still think an order must be tied to a specific product.  product key is your best bet

Anku
Creator
Creator
Author

Thanks Edwin for actively sharing your thoughts but unfortunately product key is not available.

edwin
Master II
Master II

If you don’t have a product key then you need to creat your own. You need to agree with the business what fields are used to uniquely identify a product and use that/those fields to synthesize a new field which will be your product key. Obviously this new field needs to be in all tables that refer to a product