Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
ElenaDominguez
New Contributor II

Make a table where the stock accumulate month by month

Hello,

I apologize for my english, i hope you understand.

I have the next problem:

I want to do a table where the stock showing the accumulate quantity month by month,

I have the quantity wich is ussed in each month but i want to accumulate month by month taking the initial stock, i do the next formula Sum({<Fecha = {"<=$(= Max(Date(Fecha)))"} >}Cantidad) but doesn´t work how i want it.

These are the information i have:

Type A

MonthConsumo
JanuaryInitial Stock 10
February5
March5
April10

Tiype B

MonthConsumo
JanuaryInitial Stock de 5
February2
March-2
April5

This is what i want it:

TypeJanFebMarApr
A10152030
B57510

Quiero hacer una tabla donde muestre el stock con que termina cada mes, esta información se tiene que ir acumulando por cada mes que vaya pasando.

Tengo la cantidad que se utilizo en cada mes y esta debe sumarse al saldo inicial de cada mes, hice la siguiente formula en una tabla : Sum({<Fecha = {"<=$(= Max(Date(Fecha)))"} >}Cantidad) pero solo funciona si selecciono una fecha.

La información que tengo es la siguiente:

Tipo A

MesConsumo
EneroSaldo inicial de 10
Febrero5
Marzo5
Abril10

Tipo B

MesConsumo
EneroSaldo inicial de 5
Febrero2
Marzo-2
Abril5

El resultado que quiero hacer es el siguiente:

Tipo EneroFebreroMarzoAbril
A10152030
B57510

Agradezco su ayuda

Tags (1)
5 Replies

Re: Make a table where the stock accumulate month by month

Check if that helps?

RangeSum(Before(TOTAL Sum(Consumo),0,ColumnNo()))


Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Sergey_Shuklin
Valued Contributor

Re: Make a table where the stock accumulate month by month

Hello, Elena!

You can solve such tasks (calculating accum values) with RangeSum() function. And additional Above() or Before() function depend of presentation of table. Take a look at the pic and attached file, please.

accum_sum.png

ElenaDominguez
New Contributor II

Re: Make a table where the stock accumulate month by month

Thank you very much!!! i could solve it!!

ElenaDominguez
New Contributor II

Re: Make a table where the stock accumulate month by month

Thanks!! Only i just remove the TOTAL statement and it works!

Re: Make a table where the stock accumulate month by month

Great, You may help us to mark Helpful and Correct Answer

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)