Help

Re: Using Multiple IF statements w/ Values from Multiple Columns

Solved
Jump to Solution
1061 0
cancel
Showing results for 
Search instead for 
Did you mean: 
zuilkowski_
5 - Automation Enthusiast
5 - Automation Enthusiast

I want to combine multiple IF statements from data in two columns and return a TRUE or FALSE result.

The two columns/data I am using are:

  1. User Subscription Level (Basic, Pro, Premium)
  2. Total Requests (Sum of values from multiple fields)

Screenshot 2023-09-24 at 4.09.47 PM.png

What I've tried to do so far seems to not be working very well and I am a complete novice when it comes to Airtable formulas.

 

IF(
  AND({Subscription} 
  = "price_1NZdQ5C8Jx0D8bOIPFa8Nlto", 
  {Total Requests}<"8"), 
  "Limit Not Reached",
IF(
   AND(
      {Subscription}
      ="price_1NkT9EC8Jx0D8bOIMXi0g37m",
      {Total Requests}>="25"
   ),
      "Limit Not Reached 2",

IF(
   {Subscription}
   ="price_1NkT9EC8Jx0D8bOIMXi0g37m"
   ),
      "Limit Not Reached 3",
      "Limit Reached"
)
)

 

Ultimately what I'm trying to do is check the user's subscription level and the number of requests they've submitted and evaluate if they are at their limit or under their limit.

I'm not sure if I'm fully grasping how the logic is supposed to flow and I am also thinking that because the subscription is different for each statement that might be throwing me off for how I should organize the logical statements?

Any direction would be really great as I'm trying to learn as I go.

1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

If "Subscription" is a single select, it would be easier to understand if it were separated.

IF({Subscription} = "price_1NZdQ5C8Jx0D8bOIPFa8Nlto",
   IF({total requests}<8,
      "Not Reached",
      "Reached"
   )
)&
IF({Subscription} = "price_1NkT9EC8Jx0D8bOIMXi0g37m",
   IF({total requests}<=25,
      "Not Reached",
      "Reached"
   )
)

See Solution in Thread

3 Replies 3
Sho
11 - Venus
11 - Venus

If "Subscription" is a single select, it would be easier to understand if it were separated.

IF({Subscription} = "price_1NZdQ5C8Jx0D8bOIPFa8Nlto",
   IF({total requests}<8,
      "Not Reached",
      "Reached"
   )
)&
IF({Subscription} = "price_1NkT9EC8Jx0D8bOIMXi0g37m",
   IF({total requests}<=25,
      "Not Reached",
      "Reached"
   )
)
Sho
11 - Venus
11 - Venus

or like this

IF({Subscription},IF(
   OR(
      IF({Subscription} = "price_1NZdQ5C8Jx0D8bOIPFa8Nlto",
         IF({total requests}<8,TRUE())
      ),
      IF({Subscription} = "price_1NkT9EC8Jx0D8bOIMXi0g37m",
         IF({total requests}<=25,TRUE())
      )
   ),
   "Not Reached",
   "Reached"
))
zuilkowski_
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks @Sho this was really helpful. Appreciate you showing a few different ways to achieve the same result.