BusinessObjects Board

Problem with WHERE and InList

Ok, so I am trying to create a variable that calculates total number of non severance related terminations. My formula is this:

= Where ( Not InList “ELI”, “RED”)

What am I doing wrong?! Am I completely confused and way off the mark?

Befuddled.


lisachoi (BOB member since 2004-06-24)

How about

=sum(If <REASON> Inlist ("ELI","RED") Then 0 Else 1)

?

Please, take a look at this FAQ Reporter entry.

I prefer WHERE clauses over IF THEN ELSE in Business Objects Reporter, because IF THEN ELSE requires the dimension you are comparing against to be in the block.

Moderator remark:
Please, choose more descriptive topic titles other than “Why won’t this work?! Grrr.” I changed the topic title to “Problem with WHERE and InList”


Andreas :de: (BOB member since 2002-06-20)

Uhm, I tried using the If then clause. It didn’t work so I went back to using the Where clause. What would be the correct way of inputting in a ‘not’ in the statement. I need to exclude ELI and RED.

So my original formula is

= Where( Not “ELI” and Not “RED”)

The formula works with a = statement but doesn’t work with a Not statement.

:cuss:


lisachoi (BOB member since 2004-06-24)

You have to create a helper variable as pointed out in this FAQ Reporter entry I linked to.

Helper variable (data type boolean):

= NOT ( <REASON>InList ("ELI", "RED") )

Then:

= <measure> WHERE ( <Helper variable> = 1)

Andreas :de: (BOB member since 2002-06-20)

Yeah! Thank you! Thank you!

Happy dance! :lol: :lol: :lol: :lol:


lisachoi (BOB member since 2004-06-24)