Creating a custom expression

Hi,

I'm trying to figure out how to write my original CASE query by using the custom expressions.

My case in SQL is something like this:

case
when persondetail.postcode in ('9300','9310','9320') then 'Aalst'
when persondetail.postcode in ('9470','9472') then 'Denderleeuw'
else 'Already moved out'
end

What i have now already in a custom column is:

case([Persondetail → Postcode] = '9300', "Aalst")

but really can't figure out how to do the same as in my case.

Hi @cobalt
You have to create a larger expression like:
case([Persondetail → Postcode] = "9300" OR [Persondetail → Postcode] = "9310" OR [Persondetail → Postcode] = "9330", "Aalst", [Persondetail → Postcode] = "9470" OR [Persondetail → Postcode] = "9472", "Denderleeuw", "Already moved out")

1 Like

Worked, thanks!