Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

nithya123
New Contributor II

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
MVP
MVP

Re: peek function

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

9 Replies
MVP
MVP

Re: peek function

Something like this

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

nithya123
New Contributor II

Re: peek function

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

MVP
MVP

Re: peek function

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

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

payalgosar
Contributor II

Re: peek function

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".

nithya123
New Contributor II

Re: peek function

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

load *, no|sales

1|10,

2|20,

3|40,

4|50;

payalgosar
Contributor II

Re: peek function

Please find attached the file for example

surendraj
Valued Contributor

Re: peek function

Hi,

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

Calculating rolling n-period totals, averages or other aggregations

--Surendra

MVP
MVP

Re: peek function

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

nithya123
New Contributor II

Re: peek function

ya its coming. thank you

Community Browser