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: 
Not applicable

Rank Periods

Morning all,

I would like to calculate a rolling average over 6 periods. I have implemented a rangesum calculation that works well, but the problem is that if it is the first period, I would like to write an if statement that there is only one period and thus QV must only divide by 1 if it is the second period, it must divide by 2 and from 3 periods onwards it can divide by 3...

The formula that I have implemented looks as follows:

(sum(m1_total_revenue) + rangesum(above(sum(m1_total_revenue),1,1)) + rangesum(above(sum(m1_total_revenue),2,1)))/3

and this is in a pivot table that has been set out per period..

thank you for your assistance,

L

Labels (1)
0 Replies