Mar 18, 2021 01:48 PM
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!
Mar 18, 2021 07:27 PM
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
)
Mar 19, 2021 08:17 AM
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.
Mar 19, 2021 08:20 AM
I figured it out. Spelling was an issue - must match the spelling exactly. Thanks so much for all your help.