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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Rolling average

PFA

I have used below function for calculating rolling average for 3 consecutive rows

but my requirement is first 2 rows should be blank and average of 3 rows should be start from second row onwards.

Similiarly if i input 4 first three rows should be blank and  average should displayed from fourth row onwards.

rangeavg(above(sum(sales),0,3))

Please suggest

2 Replies
sunny_talwar

Use this expression:

=If(RowNo() > 2, rangeavg(above(sum(sales),0,3)))


Capture.PNG

Anonymous
Not applicable

The RowNo() function should help you :

     if ( rowno() > 2 , rangeavg(above(sum(sales),0,3)) )