Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Average multiple switch formula columns

Topic Labels: Formulas
1645 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Kristen_Tcherne
5 - Automation Enthusiast
5 - Automation Enthusiast

I have a table with multiple single select columns. Each single select column generates a numerical value, through a switch formula. I want to average the numerical values for each switch formula column. When I average the columns out now, I get back NaN.

Here are examples of my switch formula columns:

Screen Shot 2020-11-01 at 11.37.03 Screen Shot 2020-11-01 at 11.37.11

Is there a way to do this?

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

Your switch formulas are return strings instead of numbers. Remove the quotes around the numbers in the switch formula so that the formula returns numbers.

SWITCH({Length},
  'Less than 1 minute', 1,
  '1-3 minutes', 2,
  '3-5 minutes', 3,
  '5-7 minutes', 5,
  '7+ minutes', 8
)

This Airtable newbie is very grateful that it was a quick fix - thank you! :slightly_smiling_face: