Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kicchu465
Creator
Creator

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
sunny_talwar

You want this in a chart or script?

el_aprendiz111
Specialist
Specialist

Hi,

1 option

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

acm.png

kicchu465
Creator
Creator
Author

Hi Fer,

Thanks for the reply.

Its working fine now.

much appreciated for the video provided.

Thanks,

Kb

its_anandrjs

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

];