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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Assumption based calculation

Hello to All,

I am trying to perform a complex calculation which is based on an Assumption as per company policy.

For this, we have two tables: one for receiving transactions and other for consumption transactions.

Receiving Trans:

DateItemRec QtyImported
Jan/02/2014ACB500Yes
May/02/2014ACB300No
Jan/03/2014ACB200No
Jan/03/2014ACB200Yes
Feb/08/2014ACB1000No
Mar/08/2014ACB10No
Apr/08/2014ACB1550Yes
May/03/2014ACB500Yes
Jun/03/2014ACB30No
Jul/03/2014ACB40Yes
Aug/04/2014ACB100Yes
Sep/05/2014ACB450No
Oct/02/2014ACB305Yes
Nov/02/2014ACB100No
Dec/02/2014ACB50Yes

Consumption Trans:

ItemIssued QtyDate
ACB300Jan/02/2014
ACB300May/02/2014
ACB150Jan/03/2014
ACB190Jan/03/2014
ACB800Feb/08/2014
ACB40Mar/08/2014
ACB50Apr/08/2014
ACB430May/03/2014
ACB30Jun/03/2014
ACB40Jul/03/2014
ACB80Aug/04/2014
ACB300Sep/05/2014
ACB150Oct/02/2014
ACB200Nov/02/2014
ACB130Dec/02/2014

As shown above, consumption table do not have 'Imported' Flag. But Company assume that first they will consume 'Imported' qty and after this 'un-imported' qty.

Now the requirement is that, we have to calculate month wise opening & closing stock for 'imported' and 'un-imported' Qty. If Imported qty is not available in stock then it will show zero balance.

For Example, available stock is as follow:

Month       Item       ImportedQtyStok   

-------------------------------------------------------------

Jan-2014     ACB       60

Feb-2014     ACB       0

Mar-2014    ACB         0

Apr- 2014    ACB

Labels (1)
2 Replies
anbu1984
Master III
Master III

Can you explain more on your requirement? How did you calculated Imported Stock qty?

Not applicable
Author

Hello to All,

I am trying to perform a complex calculation which is based on an Assumption as per company policy.

For this, we have two tables: one for receiving transactions and other for consumption transactions.

Receiving Trans:

        DateItemRec Qty
Excisable
Jan/02/2014ACB500Yes
May/02/2014ACB300No
Jan/03/2014ACB200No
Jan/03/2014ACB200Yes
Feb/08/2014ACB1000No
Mar/08/2014ACB10No
Apr/08/2014ACB1550Yes
May/03/2014ACB500Yes
Jun/03/2014ACB30No
Jul/03/2014ACB40Yes
Aug/04/2014ACB100Yes
Sep/05/2014ACB450No
Oct/02/2014ACB305Yes
Nov/02/2014ACB100No
Dec/02/2014ACB50Yes

Consumption Trans:

ItemIssued QtyDate
ACB300Jan/02/2014
ACB300May/02/2014
ACB150Jan/03/2014
ACB190Jan/03/2014
ACB800Feb/08/2014
ACB40Mar/08/2014
ACB50Apr/08/2014
ACB430May/03/2014
ACB30Jun/03/2014
ACB40Jul/03/2014
ACB80Aug/04/2014
ACB300Sep/05/2014
ACB150Oct/02/2014
ACB200Nov/02/2014
ACB130Dec/02/2014

As shown above, consumption table do not have 'Imported' Flag. But Company assume that first they will consume 'Excisable' qty and after this 'un-excisable' qty.

Now the requirement is that, we have to calculate month wise opening & closing stock for 'Excisable' and 'un-excisable' Qty. If Excisable qty is not available in stock then it will show zero balance.

For Example, available Excisable stock should be as follow:

Month      Item      ExcisableStok Qty

-------------------------------------------------------------

Jan-2014    ACB      60

Feb-2014    ACB      0

Mar-2014    ACB        0

Apr- 2014    ACB      1500

-----------------------------------------------------------

Please provide your suggestion to accomplish  this.

Thanks in Advance