Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

How to show last 3 months average in straight table?

Hi  all,

can you tell me how to achieve the below requirement. 

Avail Fields: Month, Sales.

Required Output: AvgSales 

example--

for jan it showing jan sales

fer feb it showing jan+feb average sale

for mar it showing jan+feb+mar average sale

for Apr it showing feb+mar+Apr average sale

please help me on that.

Previous 3 months average.png

 

Thanks

1 Solution

Accepted Solutions
Saryk
Partner - Creator II
Partner - Creator II

Perhaps try this also, still ordering by date.

=RangeAvg(Above(Sum(Sales),0,3))

View solution in original post

4 Replies
vunguyenq89
Creator III
Creator III

Hi, you can use the following expression:

=RangeAvg(Above(Avg(Sales),0,3))

Hope this helps,

BR,

Vu Nguyen

daisy1438
Contributor III
Contributor III
Author

not working

 

Saryk
Partner - Creator II
Partner - Creator II

It has to be ordered by month. 

Saryk
Partner - Creator II
Partner - Creator II

Perhaps try this also, still ordering by date.

=RangeAvg(Above(Sum(Sales),0,3))