# ESRI Raster Calculator error "Con()"

I"m trying to nest expressions in this raster calculator conditional statement, but I get an error.

This statement works, so I tried to follow it as a template:

``````Con (IsNull("ras1"),"ras2","ras3")
``````

Separately, this statement works

``````"rasB"-(5+(1/(1+"rasC"))*5)*("RasD"<=20)
``````

And I'd love to merge them into one calulation liek this

``````Con(IsNull("rasA"),
("rasB"-(5+(1/(1+"rasC"))*5)*("RasD"<=20),
("rasB"-(5+(1/(1+"rasC"))*5)*("RasD"<=500))))
``````

Where "rasA" is null, return "rasB"-(5+(1/(1+"rasC"))5)("RasD"<=20). Otherwise return "rasB"-(5+(1/(1+"rasC"))5)("RasD"<=500)

I get the error shown below so I'm trying to figure out if Con() requires a layer like the error says or if can I use an expression and I just entered it wrong. • Please remember to place the complete error text in the question as ASCII. This makes it legible on all platforms and available for search by others. Mar 26 '19 at 21:18

Your parentheses are incorrect. You have parentheses around both the True and False expressions, i.e:

``````Con(condition, (true_expression, false_expression))
``````

It should be:

``````Con(condition, true_expression, false_expression)
``````

Try:

``````Con(IsNull("rasA"), "rasB"-(5+(1/(1+"rasC"))*5)*("RasD"<=20), "rasB"-(5+(1/(1+"rasC"))*5)*("RasD"<=500))
``````

Or:

``````Con(IsNull("rasA"), ("rasB"-(5+(1/(1+"rasC"))*5)*("RasD"<=20)), ("rasB"-(5+(1/(1+"rasC"))*5)*("RasD"<=500)))
``````
• Parentheses...I always miss some mundane detail like that! point of clarification... in your answer, instead of Con(condition, true_expression, true_expression) should it be Con(condition, true_expression, FALSE_expression) ? Mar 27 '19 at 15:02