Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to write the following formula ?

Hi all,

     I have problem to write the following formula and appreciate if someone here can help me.

Average.jpg

Formula in excel is in the picture above.

Thanks a lot.

3 Replies
Not applicable
Author

In addition, I tried to calculate the simple average by applying the following formula:

=rangeavg(above(avg(Sales),0,5))

But when facing the above weighted average formula, i couldn't think of any solution.....

Gysbert_Wassenaar

Try:

rangesum(sum(Sales)*5,above(sum(Sales))*4,above(sum(Sales),2,1)*3,above(sum(Sales),3,1)*2,above(sum(Sales),4,1) )/15


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks! Gysbert!

But is there a way that can make this formula more dynamic by changing a day variable (this example here is 5 days and so, variable is 5)? What if I would like to make this formula to calculate 10/20/30 days weighted average?

Sorry that I didn't state very clear before.

Thanks