Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Implementing Moving Average on Chart

Gentlemen/ladies,

We are trying to implement moving average on chart.
Currently we have implemented this set analysis expression:
if(vol > 0, rangesum(above(sum({$<[yr] = , [yr_mth] = >} vol/rate),0,3)) / 3 , null())

Dimensions on chart are [yr_mth] and sales (vol/rate).
"Suppress When Value Is Null" is selected

The problem is whenever we select some [yr] and/or [yr_mth] values we get odd data filtered but chart itself is not zoomed to selected data.
For example, if year 2010 selected then chart shows all yr_mth members and bars are presented only for selected period.

We'd like to have those empty months removed.

Can we do it some way?


Whenever we change expression to
if(vol > 0, rangesum(above(sum({$<[yr] = >} vol/rate),0,3)) / 3 , null())
and select specific year we get chart properly filtered but result is wrong since we get average for first two months calculated with one and two data points respectivly.


Qlikview version 10

Thanks in advance for response,
Victor

1 Reply
Not applicable
Author

Note:

Suppression of zero values is automatically disabled when these functions are used. NULL values are disregarded.

Above function will disable this suppress 0 function.