Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

peek function

nosalesoutput
11010
22030
34070
450120

From the table i want the first sales value in output column, after i want to add the first value in output column and second value in sales column. similarly all the values add. which function can be use?

1 Solution

Accepted Solutions
sunny_talwar

Here you go...

Table:

LOAD * INLINE [

    no, sales

    1, 10

    2, 20

    3, 40

    4, 50

];

FinalTable:

LOAD *,

  RangeSum(Peek('output'), sales) as output

Resident Table

Order By no;

DROP Table Table;


Capture.PNG

View solution in original post

9 Replies
sunny_talwar

Something like this

RangeSum(Peek('output'), sales) as output

Anonymous
Not applicable
Author

sunny,

In my table i am having only no and sales, and the output field will be create using expression only.

in that field come at like above result

sunny_talwar

Are you doing this on the front end? May be this...

RangeSum(Above(Sum(sales), 0, RowNo()))

Anonymous
Not applicable
Author

Hi Nithyakala,

To do cumulative task, in expression you have option for accumulation.

In given case above, go to Chart Properties -> Expression Tab, select "Full Accumulation".

Anonymous
Not applicable
Author

nope, am using script. am used this following expression,

load *, no|sales

1|10,

2|20,

3|40,

4|50;

Anonymous
Not applicable
Author

Please find attached the file for example

surendraj
Specialist
Specialist

Hi,

Refer the above link.it may help you with clear Explanation.

Calculating rolling n-period totals, averages or other aggregations

--Surendra

sunny_talwar

Here you go...

Table:

LOAD * INLINE [

    no, sales

    1, 10

    2, 20

    3, 40

    4, 50

];

FinalTable:

LOAD *,

  RangeSum(Peek('output'), sales) as output

Resident Table

Order By no;

DROP Table Table;


Capture.PNG

Anonymous
Not applicable
Author

ya its coming. thank you