Monday, March 26, 2012

Question regarding calculated fields in reporting services 2005

Is there a concept of scope for calculated fields? I tried the
following and VS crashed.
=IIf(RowNumber("GroupName") = 1, MyValue, 0)
Example of what I am trying to accomplish.
GroupID, MyValue
1, 5
1, 5
1, 5
2, 10
3, 20
3, 20
========== Average MyValue should be (5 + 10 + 20)/3...not (5+5+5+10+20+20)/5.
MyValue would be the same for each GroupID. Does this make sense?Hi,
Infact you can use "Avg()" itself it has a scope parameter.
Amarnath
"Nergock@.gmail.com" wrote:
> Is there a concept of scope for calculated fields? I tried the
> following and VS crashed.
> =IIf(RowNumber("GroupName") = 1, MyValue, 0)
> Example of what I am trying to accomplish.
> GroupID, MyValue
> 1, 5
> 1, 5
> 1, 5
> 2, 10
> 3, 20
> 3, 20
> ==========> Average MyValue should be (5 + 10 + 20)/3...not (5+5+5+10+20+20)/5.
> MyValue would be the same for each GroupID. Does this make sense?
>

No comments:

Post a Comment