Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a table containing invoice numbers, customer IDs, total cost, salespersons, etc. and I would like to calculate the commission that should be provided to the salesperson. The commission percentage is set to 5 %, however, for some specific customers, the percentage is different. The table looks something like this:
Invoice number | CustomerID | Cost | Salesperson | Commission |
1 | Berit | 1005.00 | Lars | ? |
2 | 10002324 | 304.00 | Susan | ? |
3 | Hello | 10.00 | Susan | ? |
4 | 13432 | 20000.89 | Lars | ? |
Therefore, I also have a lookup table that contains specific customer names or numbers and the associated commission. It looks like this:
CustomerID | Commission percentage |
Berit | 6 |
10002653 | 9 |
I would then like to write the code to calculate the commission that should be provided to the salespersons for the different invoices.
I can find if the invoice contains a customer that provided a different commission, but I can't apply the commission. How should I do?
Solved! Go to Solution.
Hey @Rose__123 ,
if you want the comission as a calculated column in the Invoice table try the following calculated column:
Comission =
VAR vRowCustomer = Invoice[CustomerID]
RETURN
CALCULATE(
MAX( Comission[Commission percentage] ),
Comission[CustomerID] = vRowCustomer
)
Hey @Rose__123 ,
if you want the comission as a calculated column in the Invoice table try the following calculated column:
Comission =
VAR vRowCustomer = Invoice[CustomerID]
RETURN
CALCULATE(
MAX( Comission[Commission percentage] ),
Comission[CustomerID] = vRowCustomer
)
Thank you it works! 🙏
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
9 | |
9 | |
8 |