cancel
Showing results for 
Search instead for 
Did you mean: 

IF ELSE condition in Bex queries

Former Member
0 Kudos

Hello All ,

I have a formula variable named RMA Response Days which is Billing Date minus Delivery Date. But if Billing Date is blank, the field comes up with u201CDoes not Existu201D. What should happen is that if Billing Date is blank, then the query should use current date instead.

Would some one please help me in writing this formula in bex.

Regards,

Mahesh.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

I Have a formula field called "ZDP_RULE_A_1", for this i have a condition If this field value is 1 then display TRUE or else FALSE.can anyone let me know the formula please.

Thanks,

Santhosh Kumar.

Former Member
0 Kudos

RMA Response Days = ( Billing Date * ( Billing Date <> 0 ) ) + ( Current Date * ( Billing Date = 0 ) ) - Delivery Date.

I have said 0 but you need to replace 0 with whatever the key value is for the Does Not Exist text for Billing Date. The logic above works on the basis that BEx will return a value of 1 or 0 for a TRUE and FALSE result of a Boolean expression respectively.