Isssue with Switch formula for simple yes/no question

AirTable Communityc,

I am trying to find a simple way to score a “yes/no” question. I need to say that a yes answer is equal to a “1” and a “no” answer is equal to a “0”

I was using the switch formula but I cannot formulate it correctly. I also tried an “IF” formula without success. Thoughts? Here is my formula:

SWITCH({Aircraft - Is all equipment secured appropriately in the main cabin and the aft compartment?},
yes, ‘1’,
no, ‘0’,
‘0’
)

Thanks in advance!

A SWITCH is overkill in this situation. An IF statement will work, but it needs to be structured correctly.

When you have a text string, like the word yes put it in straight quotes. When you want a number like 1 or 0, do not use quotes.

IF(
  {Aircraft - Is all equipment secured appropriately in the main cabin and the aft compartment?} = "yes", 
  1, 
  0
)

Thanks so much for your help. I am still unable to get the correct result but it did confirm the structure.

Do you see what I am doing wrong? I get the default = 0 for all the yes answers. The question is a single select question.

I figured it out. Spelling was an issue - must match the spelling exactly. Thanks so much for all your help.

1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.