Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Tags (2)
Community Browser