cancel
Showing results for 
Search instead for 
Did you mean: 

Bex IF THEN ELSE not working with Units

Former Member
0 Kudos

Hi,

I have an issue with IF THEN ELSE IN BEX QUERY. Below is the condition I am using

( A <> 0 ) * A + ( B <> 0 ) * B + ( C <> 0 ) * C

I am getting incorrect report output is the sum of A + B + C, I am expecting whichever is the condition falls need to be output.

Out of the three RKFs ( A / B / C ) for three months I want only one based on the condition.

Note - A / B & C are Quantities.

Thanks

Robbie.

Accepted Solutions (1)

Accepted Solutions (1)

giselle_lin
Active Participant
0 Kudos

Hi Robert,

It could be both A and B are not 0, at the same time A and B has different unit. Then you get * as result.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Giselle,

My question here is I have values in A, B & C but IF THEN ELSE is not checking the condition properly and it is summing all three A + B + C.

I tried different ways but still, it is adding.

Thanks

Robbie,