OF and OR

In looker calculation I’d like to combine IF and OR.

For example given a list of groceries like

apple

pear

bean

radish

sponge

orange

lettuce

I’d like to automatically identify as a fruit, vegetable or other

i.e.

if grocery = “apple” OR “pear” OR “orange” then return “fruit”

if grocery = “bean” OR “radish” OR “lettuce” then return “vegetable”

otherwise return “other”

I have no SQL experience, limited Looker and some Excel.

Sorry such a basic question

0 1 120
1 REPLY 1
Top Labels in this Space