Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

If then else statements

I am trying to create a formula that returns results based on a string of embeded if then else statements such that if field A is greater than zero, then return that value, else if field B is greater then zero, then return that value, else return the value of field C.

How do I do this?

Here's my current formula, but it currently only returns the value of the first field or a blank.

If {qryILDataForCrystal.MISFRate} > 0 then {qryILDataForCrystal.MISFRate}

else if {qryILDataForCrystal.CurrentRate} >0 then {qryILDataForCrystal.CurrentRate}

else {qryILDataForCrystal.AnnualCombinedIRR}

please help.

thanks.

Former Member
replied

Hi,

Please select "Default Values for nulls" in the formula editor. You can find this at the top in formula editor where the default option is "Exception for nulls".

Now try this formula

If {qryILDataForCrystal.MISFRate} > 0 then {qryILDataForCrystal.MISFRate}

else if {qryILDataForCrystal.CurrentRate} >0 then {qryILDataForCrystal.CurrentRate}

else {qryILDataForCrystal.AnnualCombinedIRR}

Regards,

Raghavendra

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question