system
#1
I have a report which values as following:
State Revenue
SC 75475
SE 37373
VA 63743
IN 65444
IL 87655
I want to sum the revenue for the states SC and SE ,VA and IN and have used the formula below
=Sum() ForEach() Where (=“SC AND SE”) does not work where as If iam giving in the way
below
=Sum() ForEach() Where (=“SC”) is working.Can any one have done this before.
Roger123 (BOB member since 2005-12-18)
system
#2
Look at this Reporter FAQ entry, please: Why do I get an error when I try to Sum() Where ( > 2000)?
Andreas (BOB member since 2002-06-20)
system
#3
It is of not any help for me because I want to use 2 values…which is not allowing me to do…
Roger123 (BOB member since 2005-12-18)
system
#4
Try using the WebI formula (which you can turn into a variable):
=Sum(If([State] InList (“SC”;“SE”);[Revenue];0))
Syntax for DeskI is:
=sum( If InList (“SC”, “SE”) Then else 0)
JMCabot (BOB member since 2005-12-21)
system
#5
The very same principle applies as outlined in the Reporter FAQ:
Create a “Flag” variable (data type BOOLEAN):
= <STATE> = "OH" OR <STATE> = "GA"
Now create your measure variable:
= SUM (<Measure>) WHERE (<FLAG> = 1)
Andreas (BOB member since 2002-06-20)