3 Replies Latest reply on May 6, 2018 3:21 PM by sraposo

# Which Expression Analyses is useful

B-1 and B-2 these are attributes,

Now, I want to show that if the values of B-1 and B-2 are 1 then only they should be calculated otherwise it is not necessary.

I have used NoOutput() status but I got bad values.

> If ('B-1'=1) And ('B-2'=1) then 1 Else NoOutput()

• ###### Re: Which Expression Analyses is useful

Hi Narendra,

I would try modifying your expression along the following lines:

If ('BL-1' = 1) And ('BL-2' = 1) Then 'BL-1' * 'BL-2' Else NoOutput()

Your original expression is basically an AND operation, however the syntax is just a little bit off. If this Analysis is more than just a learning exercise, I would even consider simplifying it further:

If ('BL-1' = 1) And ('BL-2' = 1) Then 1 Else NoOutput()

Depending on the usage requirement of the Analysis output, you will only ever see values of 1 in the output - if you intend to use this as some sort of toggle indicator, then I wouldn't use NoOutput(), rather I would set the output to 0 in the Else branch.

• ###### Re: Which Expression Analyses is useful

Hello john,

Thanks for giving your time, I understand.

Is there any expression like "Either Or" to use?

then I can use,

Either ('BL-1'=1) Or ('BL-2'=1)

• ###### Re: Which Expression Analyses is useful

Hi Narendra,

You can use the OR logication operator. If 'BL-1=1' OR 'BL-2=1  Then ...

Thanks,

Seb

1 of 1 people found this helpful