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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vidhya91gct
Partner - Contributor
Partner - Contributor

Rolling 6 Month RangeAvg in Pivot Table

Hi All,

Please find the attached file.

I want to show the Average is calculating as below,

if(1 st column is getting same value as in the Average Month, else getting rangeAvg from Jan to Jun2018

Next

Jul2018 is getting same value as in the Average Month, else getting RangeAvg from Jul to Dec2018 )

expecting Output:

 

Default_YearMonthJan2018Feb2018Mar2018Apr2018May2018Jun2018Jul2018Aug2018Sep2018Oct2018
Average9.4%10.0%10.0%10.4%10.5%10.3%7.6%8.7%9.8%10.7%
Red16181719181614182225
Total171169169165166175184184183189
Average Month9.4%10.7%10.1%11.5%10.8%9.1%7.6%9.8%12.0%13.2%

I am using in the below expression and getting incorrect RangeAvg

=RangeAvg(Before(RangeSum(Average Month),0,6))

Please help me on it.

Thanks & Regards,

Vidhya K

1 Reply
sunny_talwar

May be you need this

=RangeAvg(Before(Sum(Average_Month), 0, 6))