Help

Re: Need help on automatically calculation

Solved
Jump to Solution
719 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Jack_Teng
4 - Data Explorer
4 - Data Explorer

Is there a way that we can automatically calculating based on different conditions

For example

IF
Service: Deep tissue massage
Time: 60 minutes

Result: Commission: 80

IF
Service: Deep tissue massage
Time: 90 minutes

Result: Commission: 150

IF
Service: Pain Relief massage
Time: 90 minutes

Result: Commission: 140

Thank you so much :pray:

1 Solution

Accepted Solutions
Jason
Airtable Employee
Airtable Employee

Hi Jack,

You can accomplish that with a nested IF statement like this:

IF(
   AND(
      Service="Deep tissue massage", 
      Time="60 minutes"
   ),
"Commission: 80",

IF(
   AND(
      Service="Deep tissue massage", 
      Time="90 minutes"
   ),
"Commission: 150",      

IF(
   AND(
      Service="Pain relief massage", 
      Time="90 minutes"
   ),
"Commission: 140"
)
)
)

You can keep adding on conditions as needed - just make sure that you add commas at the end of all but the last condition (e.g. after “Commission” XXX), and add closing parentheses for however many conditions you have (e.g. 3 in the example above).

See Solution in Thread

1 Reply 1
Jason
Airtable Employee
Airtable Employee

Hi Jack,

You can accomplish that with a nested IF statement like this:

IF(
   AND(
      Service="Deep tissue massage", 
      Time="60 minutes"
   ),
"Commission: 80",

IF(
   AND(
      Service="Deep tissue massage", 
      Time="90 minutes"
   ),
"Commission: 150",      

IF(
   AND(
      Service="Pain relief massage", 
      Time="90 minutes"
   ),
"Commission: 140"
)
)
)

You can keep adding on conditions as needed - just make sure that you add commas at the end of all but the last condition (e.g. after “Commission” XXX), and add closing parentheses for however many conditions you have (e.g. 3 in the example above).