Calculated Field: Variable based off date?

Scenario: A sales rep gets a higher commission per unit sold if he sells a certain number of units per month.

For example, if he sells < 10 units, he gets $100/unit commission. If he sells => 10 units, he gets $150/unit.

I have fields in Opportunities for:

Units Sold
Close Date (the date the contract was signed, which needs to be different than “expected” close)
Unit By Type (Integer field for each type of unit sold)
Total Units (calculated field based on the selected units)

So, I’d like a way so reps can create a report that will show the commission they’ve earned so far.

So, if it’s possible, I need to find a way to calculate the “commission per opportunity” but that needs to be variable based on how many units have been closed that month.

I will recommend to create a small module to calculate commissions. That will five you some flexibility to process and query any record from a logic hook.