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

Issue with RangeSum

Hi All,

I am facing an issue with rangesum when we have null values in data.

Issue:

MonthR1R2
Jan-1610
Feb-1610
Mar-161030
Apr-16-20
May-161020
Jun-161020
Jul-161030
Aug-161030
Sep-16-20
Oct-6-10
Nov-161010
Dec-16-10

R2 is total of 3 month sum of R1.

So R2 in Mar-16=R1 Jan-16+R1Feb-16+R1Mar-16

                        =10+10+10

                        =30

Which we achieved through applying Rangesum(Above) function. Unfortumately the null functions(- is null value) are not handled properly and we are receing incorrect R2 results.

I am receiving below Data

YearMonthR1R2
Jan-1610
Feb-1610
Mar-161030
May-161030
Jun-161020
Jul-161030
Aug-161030
Nov-161030

My expression is something like this:

Sum(aggr(rangesum(above( sum({<Yearmonth=>}[R1])),0,3)),$(vCurrentDimForecast), YearMonth))

Please let me know if you need more clarity.

Regards,

Nita Prasad

Labels (1)
10 Replies
silambarasan
Creator II
Creator II

Dim : Date

Exp:  If(RowNo()>=3,Rangesum(above(R1,0,3)))