Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
I have a Table like this below
ID | NAME | VALUE |
---|---|---|
1 | A | 4000 |
2 | B | 2800 |
3 | C | 1000 |
4 | D | 8000 |
5 | E | 4500 |
6 | F | 7000 |
Here I want a Chart with Expression of
Expression : Avg(VALUE) - Avg(Previous VALUE)
i want out put like while calculating avg(value)-avg(previous value)
here avg(value) is talking rowno 1 - previous value is not there
avg(value) means rowno 2- previous value(rowno 1) = rowno 2 - row no 1
avg(value) means rowno 3-previous value(rowno 2 ) rowno 3- row no 2
avg(value) means rowno 4-previous value(rowno 3 ) rowno 4- row no 3
here(-) is minus .
Dimension: ID, NAME
Expression: Avg(VALUE) - Alt(Above(TOTAL Column(1)),0)
Alt(Above(TOTAL Column(1)),0) - here column1 will take from value field?
intially i have tried like Above(sum(value),1) but it did not given result
Hi,
Avg(VALUE) - Alt(Above(TOTAL Column(1)),0) -- its working fine.
A | 4000 |
B | -3720 |
C | 4720 |
D | 3280 |
E | 1220 |
F | 5780 |
Please close this thread by making appropriate answer if you are satisfied...
Regards,
Sub2u
s i agree with that,
my orginal expr looks like
avg(sum(metricvalue)/10000- avg(sum(metricvalue)/10000
in this situtaion metricvalue should come
40000 -0 =4000
2800-4000
is your above expression calculate or not ?
Avg(VALUE) - Previous (Avg(VALUE))
or
in script
previous(VALUE) as Previousvalue
andin expression
Avg(VALUE)- avg(Previousvalue )
or
in script
peek(VALUE) as Previousvalue
andin expression
Avg(VALUE)- avg(Previousvalue )
hope this helps
Is this your expected output, else can you post expected output?
HEy,
You may do like:
Avg(Value) - Avg({<ID = (ID - 1 )>}Value) ;
You may have to look the syntax .