Help

Leveraging Formula Fields - Converting a Single select value to a numeric value for use in a cal

Topic Labels: Formulas
Solved
Jump to Solution
1655 3
cancel
Showing results for 
Search instead for 
Did you mean: 
KCoates
4 - Data Explorer
4 - Data Explorer

Requesting some guidance here. I'm new to Airtable and have read some documentation but have not fund any examples similar to my use case. 

I have a single select data field that I need to convert each selection items to a numeric value that can then be leveraged in a calculated field that will score an item in the table.

How can this be done in Airtable?

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

It depends on your single select choices.

One way is to use a SWITCH formula: 

SWITCH( {single select field name},
  "choice A", 1,
  "choice B", 2,
  "choice C", 3
)

Another option works if the single select value looks like a number:
VALUE({single select field name})

Sometimes a combination approach also works and there are also interesting things that can be done by combining functions. However, these all depend on the actual choices.

See Solution in Thread

3 Replies 3
kuovonne
18 - Pluto
18 - Pluto

It depends on your single select choices.

One way is to use a SWITCH formula: 

SWITCH( {single select field name},
  "choice A", 1,
  "choice B", 2,
  "choice C", 3
)

Another option works if the single select value looks like a number:
VALUE({single select field name})

Sometimes a combination approach also works and there are also interesting things that can be done by combining functions. However, these all depend on the actual choices.

KCoates
4 - Data Explorer
4 - Data Explorer

Thank you for the quick response.  This solution works as expected.

MarcRoegiers
4 - Data Explorer
4 - Data Explorer

Does anyone know if there is a way to access the actual offered single select options to use in the formula rather than having to type them in using manually?

This way if I change the single select option wording my formula would not break.

Thanks in advance.