Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jun 14, 2021 12:35 PM
Disclaimer: I’m moderately new to Airtables.
I am working on a base that tracks commission earned for our sales department. Essentially there are two separate commissions rates that are earned: a pre-threshold rate and a post-threshold rate, where the threshold is an amount of commission earned (for example, the threshold could be $100,000, and the salesperson earns at a commission rate of 5% before they reach the threshold and at a rate of 3% after the threshold). I’m trying to write a formula that determines which commission rate to use based on the amount of total commission earned, but I keep getting a circular reference error, which I believe is caused by the fact that the total commission depends on which interest rate is used, causing the loop since both of these fields are dependent on each other. Does anyone have any advice on how to fix this? Sorry if the description is too vague, I can provide more information if need be. Thanks!
Solved! Go to Solution.
Jun 15, 2021 06:39 AM
Airtable does not like circular references. You must create a gap in the circular logic, and then bridge that gap either manually or with an automation. For example, manually or with an automation copy the result of a formula into an editable field.
Note that if you go the automation route, getting the trigger right can be tricky as every keystroke is considered an update. Also, due to the nature of the updates, you could have a cascade of automations running, which can quickly eat through your automation runs.
Jun 14, 2021 05:37 PM
I may have misunderstood your setup, so here’s the names of fields I assume you have to help contextualize my answer to your question:
^ With those field assumptions in mind, {Commission}
should be a Formula like so:
(({Amount Sold} - {Threshold}) * {Post-threshold Rate}) +
(MIN({Amount Sold}, {Threshold}) * {Pre-threshold Rate})
Jun 15, 2021 06:01 AM
First off, thanks for your help! The formula you provided works when the amount sold is greater than the threshold. However, this is not always the case, as instances arise where the amount sold is less than the threshold, since the threshold is more of a yearly cap (i.e. $75,000) which is usually only met towards the end of the year. When the amount sold doesn’t reach the threshold, the formula doesn’t do what I want it to do. I tried to add an “If-else” statement to fix this, but it resulted in a circular reference error, since Amount Sold was being used as the logical and in the return conditions. Any other advice? Sorry I didn’t specify in my initial post, since this information was crucial to solving the problem.
Jun 15, 2021 06:39 AM
Airtable does not like circular references. You must create a gap in the circular logic, and then bridge that gap either manually or with an automation. For example, manually or with an automation copy the result of a formula into an editable field.
Note that if you go the automation route, getting the trigger right can be tricky as every keystroke is considered an update. Also, due to the nature of the updates, you could have a cascade of automations running, which can quickly eat through your automation runs.