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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
manoj217
Creator III
Creator III

rolling da

i have a  straight table with month,year as dimension and sum(sales) as expression i want to create a rolling data like

Load * inline [year,month,sales

                    2000,jan,100

                    2000,feb,100

                    2000,mar,100

                    2000,apr,100

                    2000,jun,100

                    2000,ju;ly,100

                    2000,aug,100]

output:

year,month,sales,rollling month,rolling sales

                    2000,jan,100,

                    2000,feb,100,

                    2000,mar,100,

                    2000,apr,100, jan,100

                    2000,jun,100,feb,200

                    2000,ju;ly,100,mar,300

                    2000,aug,100,apr,400

how can i get the rolling data like this please suggest me

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

Use Above() function here

Capture.PNG

sunny_talwar
MVP
MVP

Change the second expression to this

=RangeSum(Above(Sum(sales), 3, RowNo()))

Capture.PNG