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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

Wants to add substitute code quantity to primary code Quantity

Hello Friends,

I need help and it is very urgent , i have an application in which client want to add substitute code quantities to primary code quantities if substitute codes are present for those primary code and if there no no substitute codes are present then it should add quantities for primary codes only.I am attaching the sample excel as well as sample application.

Thanks in advance

Ferha Jafri

Labels (1)
5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I don't understand what you mean by primary codes. I only see a 2nd_Item_Code field. Perhaps you want something like this:

Substitute:

mapping LOAD Branch_Plant&[2nd_Item_Code]&Year&Month as Key,

     Substitute_Code

FROM

[Sample.xlsx]

(ooxml, embedded labels, table is Sheet2);

Inventory:

LOAD Branch_Plant,

applymap('Substitute', Branch_Plant&[2nd_Item_Code]&Year&Month,[2nd_Item_Code]) as [2nd_Item_Code],

     Year,

     Month,

     Date,

     Quantity

FROM

[Sample.xlsx]

(ooxml, embedded labels, table is Sheet1);


talk is cheap, supply exceeds demand
ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Hello,

The scenario is like we have 2nd item code and substitute codes corresponding to 2nd item code and in the application we have many substitute codes to one 2nd item code and both are present in different tables so we will get the transactions from primary table of substitute code and the mapping of primary to substitute is present in other table as you can see in the sample data.So i want to add quantity for both primary and substitute to be added and showed under primary code.

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

If anybody face such a situation please let me know..

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Hello Gysbert,

I would like to explain the complete scenario to you in detail, the situation is like that we have different branch plant which produce different item whose codes are 2nd_Item_Code if the client don't have 2nd_Item_Code product which is the primary codes for particular branch plant and secondary for other branch plant , if you look in to the sample data you will notice that

101ALDRSQGEN01RSQGEN02

02 is a substitute code for 01 for branch plant 101ALD although it is the primary 101NSW branch plant so what i want , is when i select 101ALD RSQGEN01 i get the total Quantity as Quantity(RSQGEN01 )  for 101ALD+ Quantity(RSQGEN02) for 101ALD , hope i make you understand the scenario. This is really urgent so please let me know the solution asap.

Thanks in advance

Regards

Ferha Jafri

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Maybe like attached qvw


talk is cheap, supply exceeds demand