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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

how to calculate opening stock depending on closing stock?

how to calculate both Opening stock and Closing Stock from one field?

Closing Stock = sum(Closing_stock) of Jul 2013 i.e 10000

Opening Stock = 10000  of Aug 2013

i.e the value I get as Closing Stock of Jul 2013 is same as Opening Stock of Aug 2013

eg,

                                   July 2013    Aug 2013     Sep 2013   Oct2013

Opening Stock                  0             10000              5000     0

Closing Stock                  10000         5000               0         2000

I am calculating Closing Stock as Sum(closing_stock)  . the table has only one value closing_stock , depending on closing_stock I have to calculate Opening Stock.

24 Replies
suvechha_b
Creator III
Creator III
Author

can you please look at my model.

its not working in my model....I have applied you expression

Not applicable

Hi,

Find the below one this one you want it?

suvechha_b
Creator III
Creator III
Author

can you please look at my model.

its not working in my model....I have applied you expression

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check the below expression for your model

if(IsNull(Before([Closing Stock ])), 0, Before([Closing Stock ]))

Here [Closing Stock ] is your expression name.

Hope that helps

suvechha_b
Creator III
Creator III
Author

why your expression is not working in my model?

is it due to my [Fiscal Month] and [year]?

Can you please look into my model once .

Thanks,

suvechha_b
Creator III
Creator III
Author

why your expression is not working in my model?

is it due to my [Fiscal Month] and [year]?

Can you please look into my model once .

Thanks,

paulwalker
Creator III
Creator III

how to calculate current month opening stock.....

i have YEAR, MONTH and TOTAL_STOCK

these are my fields

stabben23
Partner - Master
Partner - Master

Hi,

Like this: Rangesum( before([Closing Stock ])) in your opening stock expression

//Stabben

paulwalker
Creator III
Creator III

how to calculate current month opening stock.....

i have YEAR, MONTH and TOTAL_STOCK

these are my fields

is it correct?

=IF(IsNull( Above([Total Stock])),0,Above([Total Stock]))

please explain in the script level

Not applicable

Hi,

See if attached app can help you!