Skip to main content
Solved

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

  • January 25, 2023
  • 3 replies
  • 80 views

Forum|alt.badge.img+3

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?

Best answer by kuovonne

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.

3 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • Answer
  • January 25, 2023

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.


Forum|alt.badge.img+3
  • Author
  • New Participant
  • 1 reply
  • January 25, 2023

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


Forum|alt.badge.img+1
  • New Participant
  • 1 reply
  • September 18, 2023

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.