A column in this calculation does not exist when it does

Reply
Highlighted
White Belt

A column in this calculation does not exist when it does

Hello guys, 

 

I am trying to get a calculated field with case when. However, the calculation keeps saying that a column does not exist (when it obviously does)

 

Do you guys know what might have caused this problems? Thank you!


Accepted Solutions
Visitor

Re: A column in this calculation does not exist when it does

Hello,

 

Try and change to this:

case when `travel_type` = 'DOMESTIC' or `travel_type` = 'OTHER DOMESTIC' then 'Domestic' else 'International' end

 

You need to use apostrophes instead of quotations. Another way to do this case would be this:

case when instr(`travel_type`,'domestic') > 0 then 'domestic' else 'international' end

 

 


All Replies
Visitor

Re: A column in this calculation does not exist when it does

Hello,

 

Try and change to this:

case when `travel_type` = 'DOMESTIC' or `travel_type` = 'OTHER DOMESTIC' then 'Domestic' else 'International' end

 

You need to use apostrophes instead of quotations. Another way to do this case would be this:

case when instr(`travel_type`,'domestic') > 0 then 'domestic' else 'international' end

 

 

White Belt

Re: A column in this calculation does not exist when it does

Hello,

The former solution worked perfectly. Thank you!

Announcements
Win free lodging at Domopalooza! We want to hear your Domo story, enter our Dojo contest and win up to four nights lodging at Domopalooza. Click here!