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.