# Re: Isssue with Switch formula for simple yes/no question

520 0
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

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’
)

3 Replies 3
18 - Pluto

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
)
5 - Automation Enthusiast

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.

5 - Automation Enthusiast

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