Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to calculate a running sum in a script

Hi I have an doubt please any one help me with this..?

my table look like this

Table1 :

load a,b from somewhere

Table 2 :

load c from somewhere

now i created an chart :

I write an two expression a.sum(C) and b.rangesum(sum(C),above(column(2)))

A
Bsum(C)rangesum(sum(C),above(column(2)))
mumbaixyz55
chennaiabc1116
delhiijk1228
shimlalmn230
keralapqr636

but now I want to write expression running total in script.Please anyone help me with this..?

2 Replies
Not applicable
Author

try this example in script

Data:

LOAD

Date,

installs as install_new,

NUMSUM(installs, PEEK('installs', -1)) AS installs;

LOAD * INLINE [

Date , installs

01/01/2011 , 5

02/01/2011 , 4

03/01/2011 , 2

04/01/2011 , 3

05/01/2011 , 2

06/01/2011 , 1

07/01/2011 , 8

08/01/2011 , 5

09/01/2011 , 3

];

Not applicable
Author

try this

load

A,

B,

C as C_new,

NUMSUM(C, PEEK('C', -1)) AS C

table;