Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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.

13 Replies
Highlighted
Master
Master

Use this bro

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

Highlighted
Specialist II
Specialist II

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

Highlighted
Creator II
Creator II

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

Highlighted
Creator II
Creator II

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