Boolean expression for filter

Hi,

I’m trying to write a boolean expression to select all rows where a condition is not met.

The logic is

If the ClimateScenario is in 1, 2, or 3

and

The StopbankStatus is down

and

The ARI is 200

then do not select those rows.

I have tried

 → filter(!((ClimateScenario = ‘3’ || ClimateScenario = ‘2’ || ClimateScenario = ‘1’) && StopbankStatus = ‘down’ && ARI = ‘200’))

But it gives me

Unexpected character '!' at line 94, column 11

How can I write this expression is RiskScape?

Hi John,

Try using the not() function instead of ! E.g.

→ filter(not((ClimateScenario = ‘3’ || ClimateScenario = ‘2’ || ClimateScenario = ‘1’) && StopbankStatus = ‘down’ && ARI = ‘200’))

Hope that helps.

Tim

Thanks Tim that has worked well