March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I need to calculate commission using a progressive scale. Below is a sample of the commission scale table.
So for a sale of $35000 the commission would be calculated by: $570 (starting commission) + $10000 * 0,0220 = $790
Seems simple, but can't figure out how to calculate this using a DAX formula. Any suggestions?
Category | Lower | Upper | Starting commission | Percentage |
0 - 25.000 | 0 | 25.000,00 | 0,00 | 2,28 |
25.000,01 - 100.000 | 25.000,01 | 100.000,00 | 570,00 | 2,20 |
100.000,01 - 200.000 | 100.000,01 | 200.000,00 | 2220,00 | 2,32 |
Solved! Go to Solution.
Try this:
Also, I don't know if you meant to have $10000 or $35000 in the formula, but just change the numbers if I misunderstood the problem.
commission =
var hardCodedSale = 35000
var startingCommission = CALCULATE(MAX('Table'[Starting commission]), hardCodedSale >= 'Table'[ Lower ] && hardCodedSale <= 'Table'[ Upper ])
var percentage = CALCULATE(MAX('Table'[Percentage]), hardCodedSale >= 'Table'[ Lower ] && hardCodedSale <= 'Table'[ Upper ])
return startingCommission + hardCodedSale * percentage
Thanks for the quick response!
I should have asked the question more clearly.
For a sale of $35000 the commission would be calculated by:
$25000 * 0,0228 = $570
$10000 * 0,0220 = $220
Total commission = $790
So the percentage commission only applies to the amount that is considered in that category ($25000 in category 0-25000, $10000 in category 25000,01 - 100000).
Try this:
Also, I don't know if you meant to have $10000 or $35000 in the formula, but just change the numbers if I misunderstood the problem.
commission =
var hardCodedSale = 35000
var startingCommission = CALCULATE(MAX('Table'[Starting commission]), hardCodedSale >= 'Table'[ Lower ] && hardCodedSale <= 'Table'[ Upper ])
var percentage = CALCULATE(MAX('Table'[Percentage]), hardCodedSale >= 'Table'[ Lower ] && hardCodedSale <= 'Table'[ Upper ])
return startingCommission + hardCodedSale * percentage
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
127 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
204 | |
105 | |
99 | |
64 | |
54 |