Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
praveenkumar_s
Creator II
Creator II

Need to add values based on before two dates

Hi friends,

I have date and cost column. all i need is just one more field which consists of total cost for current day + last two days in load script.

Please find the attached screenshot below.

source.PNG

Please let me know in case of any clarifications.

Labels (1)
13 Replies
shiveshsingh
Master
Master

Use this bro

F:load Date, Cost, rangesum(Cost,Peek(Cost) ,Peek(Cost,-2)) as Total

eduardo_dimperio
Specialist II
Specialist II

Well you've 3 answer using Peek(), just check one of then and mark the right answer pls

praveenkumar_s
Creator II
Creator II
Author

thanks for your continuous suggestion. finally i got that..

praveenkumar_s
Creator II
Creator II
Author

suppose if we want to add n date (eg- last 8 dates) means, how can we achieve that simply?