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: 
Anonymous
Not applicable

Accumulated sums for year and month

Hi guys,

I have accumulated amounts per period but what I require is to be able to visualize it in a chart of lines analyzed for months and years, but when going to the chart at line type does not work as shown in the table chart. Please, someone can help me how to solve this problem?

acumulado.PNG

For example for the period January 2016 my result in the point of the graph should be 137733 and not 20710 as it appears in the graph.

acumulado grafico.PNG

Thank you so much.

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

13 Replies
aarkay29
Specialist
Specialist

can you please post your expression used

Anil_Babu_Samineni

That's make sense only but it's tough to explain and solve

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

rangesum(above(total sum([Ctd.en UM entrada]),0, rowno(total)))

jonathandienst
Partner - Champion III
Partner - Champion III

if you are doing the accumulation in chart expression, it works according to the chart dimensions, so each dimension value (year) accumulates from the first entry (Jan).

You have not stated how you are doing the accumulation or the expression, but you may need a RangeSum(Above TOTAL....)) type expression to accumulate the way you want, or else do the accumulation in the load script.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
aarkay29
Specialist
Specialist

Try this

Aggr(RangeSum(total Above(sum([Ctd.en UM entrada]), 0, RowNo())), Year, Month)


or

Aggr(RangeSum(total Above(sum([Ctd.en UM entrada]), 0, RowNo())), Year, (Month,(Numeric,Ascending))) this if you are using QLIKVIEW VERSION 12

Anonymous
Not applicable
Author

Queries do not work

error 1.PNG

error 2.PNG

But in the following way if they work

correcto.PNG

But still the graph does not reflect what I need

incorrecto 1.PNG

aarkay29
Specialist
Specialist

Sorry try this

Aggr(RangeSum(Above(total sum([Ctd.en UM entrada]), 0, RowNo())), Year, (Month,(Numeric,Ascending)))

It will be in red but should be evaluating the expression

Anonymous
Not applicable
Author

The same friend,

error 3.PNG

error 4.PNG

Anonymous
Not applicable
Author

Hi jontydkpi,

I used this query:

rangesum(above(total sum([Ctd.en UM entrada]),0, rowno(total)))


But still the graph does not reflect what I need.

Now the problem is that the accumulated must be dynamic based on the filters they perform, which is why I do not think the script can be done.