Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
kicchu465
Contributor

Previous data

Hi all,

I have a data like below

Name,sales

aa,100

bb,200

cc,300

dd,400

here I want output like

Newcolumn

300 [100+200]

500

700

how can I achieve this?

Thanks

4 Replies

Re: Previous data

You want this in a chart or script?

el_aprendiz111
Valued Contributor

Re: Previous data

Hi,

1 option

LOAD *, PEEK(sales)+sales AS Newcolumn;
LOAD * Inline
[
Name,sales
aa,100
bb,200
cc,300
dd,400
]
;

acm.png

kicchu465
Contributor

Re: Previous data

Hi Fer,

Thanks for the reply.

Its working fine now.

much appreciated for the video provided.

Thanks,

Kb

Re: Previous data

You can do the same with RangeSum()

LOAD *,RangeSum( Previous(Sales)+Sales ) as NewCol;

LOAD * Inline

[

Name,Sales

aa,100

bb,200

cc,300

dd,400

];