Error in Case statement in Beastmode

Hi there, I'm getting this error when creating a case statement in Beast mode. Hoping someone can help? 

 

Invalid Formula : A column in this calculation did not exist.

 

This is the case statement. It's pretty simple, and the column definitely exists in the dataset, so I'm not sure why it won't work. 

 

CASE
when `Active days` >= 90 then "90+ Days"
when `Active days` >= 60 then "60-90 Days"
when `Active days` >= 30 then "30-60 Days"
when `Active days` < 30 then "<30 Days"
end

Best Answer

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟤
    Accepted Answer

    The issue is that you are using double quotation marks in your then statement. It should be single quotes like this:

    CASE
    when `Active days` >= 90 then '90+ Days'
    when `Active days` >= 60 then '60-90 Days'
    when `Active days` >= 30 then '30-60 Days'
    when `Active days` < 30 then '<30 Days'
    end

Answers