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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problems of calculating stock

Hi guys, i've a little bit problem(i hope...)

I'm trying to make a calculation of storage warehouse.....and i 've to show it in bar chart.

my problem is that i can't make the cumulation with the past data in the selected period, to be more clear i'll make an example :

in 01/01 i've 3 pieces in my warehouse

in 02/01 i've 5 pieces in my warehouse

in 03/01 i've 10 pieces in my warehouse

in my bar chart i want to see :

example 1 :

period from 01/01 to 05/01

it's is(correct) :

tree bar with these values :

first bar = 3

second bar = 8

third bar = 18

the solution to this one is simple, it's enough to check to accumulate in the chart properties....

example 2 :

period from 02/01 to 05/01

it should be :

two bar with these values:

first bar = 8

second bar = 18

here i've a problem, in fact i see the first bar with value = 5 and second bar with value = 15, in substance i can't make cumulation of past(before 02/01) data

it'seem to be he is loosing past data and i don't know how to solve it.

Please help me.

I hope is clear.

Thx a lot.

Here it is an exaple, where the dimension is PeriodoE2E, composed by Year,Month,Day of dt_in_E2E date, in the example i need to make a simple count of id without loosing the past data not showed in the chart.

4 Replies
johnw
Champion III
Champion III

You may be able to handle it by generating an AsOf table:

AsOfDate, Date
01/01, 01/01
02/01, 02/01
02/01, 01/01
03/01, 03/01
03/01, 02/01
03/01, 01/01
04/01, 04/01
04/01, 03/01
04/01, 02/01
04/01, 01/01
05/01, 05/01
05/01, 04/01
05/01, 03/01
05/01, 02/01
05/01, 01/01

Then just make your chart by AsOfDate, and DON'T select any accumulation. The connections between the dates will do the accumulation for you, and won't be broken by making selections in the chart.

Not applicable
Author

thx a lot, but i can't understand it, please refer to my example(nowi've attached a file) and make me more clear about your suggestion....i'm a junior developer of QV.

Thank you very much

Sorry for my poor english.

johnw
Champion III
Champion III

See attached for the approach I was talking about.

You could instead calculate the stock for each day in the script. That's another option.

amien
Specialist
Specialist

Simple but brilliant. Thanks John