Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
stabdha91
New Contributor III

Aggr rangesum performance tuning.

Hi All,

I have a situation where there is a date slider  (rolling 13 months) and stacked bar charts on dashboard. All these stacked bar charts are using expressions

aggr(rangesum(above(sum({<some filters>}Count_1)),0,rowno()), date_range,category)

/

aggr(rangesum(above(sum(TOTAL{<some filters>}Count_1)),0,rowno()), date_range,category)

filters are on date_range, flags etc.

This expression is causing my application to hang and on server it takes 7-10 minutes to respond to any change in date slider.

I did this to show cumulative sum view on charts.

My data look like :

MonthCategory 1Category 2Cumulative Sum Category 1Cumulative Sum Category 2
Jan 201620702070
Feb 20163012050190
Mar 2016151865208
Apr 2016172382231
May 20162882110313
Jun 20164447154360

Cumulative sum is not present in my data base, also since i am using slider so i can't pre-calculate it in script and then use on Dashboard.

I know that the only way to handle this is perform these calculation at script level and i tried but messed things. Can anyone share a qvw showing how to carry this in script.

Thanks,

Stabdha

4 Replies
Frank_Hartmann
Honored Contributor II

Re: Aggr rangesum performance tuning.

hi,

try in script as following:

LOAD

    Month,

    [Category 1],

    [Category 2],

    RangeSum(Peek(newCat1), [Category 1])  as newCat1,

    RangeSum(Peek(newCat2), [Category 2])  as newCat2

FROM

hope this helps

stabdha91
New Contributor III

Re: Aggr rangesum performance tuning.

Hi Frank,

Thanks for the solution but my time period is not constant, i have a slider and data should keep changing according to the slider. e.g.

Check for Mar2016 data, cumulative is now depending on the selected time period (Feb 2016 to mar 2016 and not Jan-Mar 2016).

Thanks,

Stabdha

Frank_Hartmann
Honored Contributor II

Re: Aggr rangesum performance tuning.

see attached qvw

hope this helps

stabdha91
New Contributor III

Re: Aggr rangesum performance tuning.

Thanks for the solution Frank. I too used similar expression but the issue i mainly faced is of performance. When i change the date range through slider the charts take forever to load. That's why i wanted to somehow calculate the same on script and use it on UI for better performance.