Setting up a sliding commission calculation

  • 0
  • 1
  • Question
  • Updated 4 weeks ago
  • Answered
I would like to automatically populate the commission rate based on the profit margin.  I have set this up in MS Excel and also Airtable.com,  but not sure how to go about this with quickbase .

For example(see screenshot):   In the attached example has a 20.46% profit margin and would pay a 2% commission.

Here is the commission scale:
Profit Margin 00.00% to 28.99% profit margin pays 2% commission rate
Profit Margin 29.00%-30.99 pays a 2.5% commission rate
Profit Margin 31.00-32.99% pays a 3.5% commission rate
Etc, etc.....




Photo of William Bedingfield

William Bedingfield

  • 124 Points 100 badge 2x thumb

Posted 4 weeks ago

  • 0
  • 1
Photo of Forrest Parker

Forrest Parker

  • 598 Points 500 badge 2x thumb
Commision rate needs to be a formula - numeric field with a formula similar to the one below.

if
(
[Profit Margin]<.29,.02
,[Profit Margin]>=.29 and [Profit Margin]<31,.025
,[Profit Margin]>=.31 and [Profit Margin]<33,.035
,etc.
,etc.
,etc.
)
Photo of William Bedingfield

William Bedingfield

  • 124 Points 100 badge 2x thumb
What if I have the commission rates set up in another table? Sometimes the commission rates change and if I change the formula, it will recalculate the old jobs with the new commission rates.

I've attached screenshot my airtable Commission rate table to help clarify what I'm asking.



Thank you for your help.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,166 Points 50k badge 2x thumb
The proper way to do this is to have a table of the commission rates.  You could have fields for the break points and also the commission rates.  These can be entered in a table with a single record with a bunch of fields.  The [Record ID#] of that single record will be 1.

Then make a formula numeric field on the details table with a formula of 1 and make a relationship to the Commission rates table using that reference field.

Then look up all those values down to the details table.  I suggest a naming convention such as [Break Point 1 lookup], and [Commission Rate lookup]

The magic is the next step.  Then you will make a snapshot https://help.quickbase.com/user-assistance/setting_up_snapshot_fields.html

equivalent of each of those fields.

That way the commission rates will be locked in and frozen at the time the detail record is created and they will not change retroactively. 
Photo of William Bedingfield

William Bedingfield

  • 124 Points 100 badge 2x thumb
Excellent!!  Will give this a try.  Thanks for pointing me in the right direction.  
Photo of William Bedingfield

William Bedingfield

  • 124 Points 100 badge 2x thumb
Took me a little bit to wrap my head around this, but finally got it. :)  At first, I was trying to make my lookup field a snapshot field.  I didn't realize that a snapshot field is an additional field.  
Thank You!


(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,166 Points 50k badge 2x thumb
Good for you. This stuff is always easy in hindsight, but the very first time, you have to trip on your face a few times.