Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ecolomer
Master II
Master II

Accumulated value

I have a table with the movements that occur daily (Office, Product, Date, Amount) and I want to get a table with the following contents:

Office, Product, year, month, Accumulated amount.

The accumulated amount is always from the start to the month in question.

What would be the quickest and most efficient way to get it?

TX

13 Replies
MK_QSL
MVP
MVP

Data:

LOAD

  Empresa,

  Cta_Cod,

  Year,

  Month,

  Tmonth

FROM

qv969213.xlsx

(ooxml, embedded labels, table is Hoja1);

Load

  Empresa,

  Cta_Cod,

  Year,

  Month,

  Tmonth,

  If(RowNo() = 1, Tmonth, If(Cta_Cod = Previous(Cta_Cod),RangeSum(Peek('Accumulated'),Tmonth),Tmonth)) as Accumulated

Resident Data

Order By Cta_Cod, Year, Month;

Drop Table Data;

ecolomer
Master II
Master II
Author

Thank you very much for your help.

I have still a detail to be resolved.

I would like to have a record for each set Cta_Cod, Year, Month, even though there are no movements of the months.

MK_QSL
MVP
MVP

Check this..

ecolomer
Master II
Master II
Author

Perfect.

Thank's

MUCHAS GRACIAS.

Saludos,

Enrique Colomer