Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i am not able to understand how the function
rangeavg(above(sum(columnname),1,3)) works...plz explain with an example...it wud help me in understanding other range functions....
I assume you are using this expression in the context of a (straight) table, like
Dimension Expression
A 10
B 20
C 30
D 40
where Expression is e.g. sum(columname).
If you add a second expression
rangeavg(above(sum(columnname),1,3))
the above(sum(columnname),1,3) will not return a single value, but a range of values, in detail the sum(columnname) as evaluated in the 3 rows above the current row (please check the parameter details of above() in Help).
For example, in Line D, above(sum(columnname),1,3) will return the range of values {10,20,30}
If there are not enough lines above (less then three), just the available number of rows will be used.
The enclosing rangeavg() function will then take the range of values and calculate the average (10+20+30)/3=20
Hope this helps,
Stefan
i understan it but i am attaching a snap with it..look itto this case it is not working...
the expression i used here is below.plz explain it to me gor the ist 2 values of salary??
RangeAvgrangeavg(above(sum(salary),1,3))
hard to say, I can only see field value salary, but not sum(salary) as expression.
What is your dimension, have you hidden the dimensions?
have a look at it...it will help u in understanding
Still I can't see plain sum(salary) as expression. Seems to me that you have two records with salary 17000 (first line), so sum(salary) will return 34000.
I have a similar issue with RangeAvg. I am Attaching a qvw file which i have been working on. Could you help me with that what could be wrong ..