Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
adj87
Helper I
Helper I

Commission Measure

Hi Everyone,

I need help building a commission measure. I've found a lot of references which filter the Commission Tier and then multiplies the current sales * max commission percentage, but our company works differently (don't they all).

 

I have a table of Weekly Sales by Employee (AccountManager), table detailing each employee's Commission Tier (not referenced below EE_ComTier), and a final table of the specifics of each Commission Tier (Name, Low, High, Rate)

 

Take an Account Manager earning 12,000 in sales for a given week and an example of our commission structure below

 

Screenshot 2023-08-28 152555.png

Using the code below results in 12,000 * 0.1 = 1,200 which is incorrect.

 

This is the correct calculation:

 

3000 * 0.05 +

(6000-3000.01)* 0.075 +

(10000-6000.1) * 0.1 +

2000 * 0.125

 

Total Coms = 1,025

 

The weekly sales amount gets deducted through each commission bucket. I tried to adapt the below measures which has gotten me partially to the result I need (max rate * weekly sales).

 

RateTest =

VAR Sales = [AM Sales]
Return
CALCULATE(MAX(dimComTiers[Rate]),
          FILTER(dimComTiers,
             dimComTiers[SalesLw]<=Sales
             &&dimComTiers[SalesHg]>=Sales
             &&dimComTiers[Tier]=VALUES(AccountManager[Tier])))


ComTest =
VAR Sales = [AM Sales]
Return
SUMX(AccountManagers,SalesTable*[RateTest])

 

 

If anyone has any thoughts, I'd be very appreciative thank you!

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @adj87 I think one of the way is to get Commision Key (column which is not in your overview, but should be) into Sales / Fact table as calculated column on wanted level (order or what you need). Additioanal ideas could be found on link https://www.daxpatterns.com/dynamic-segmentation/ 

Hope this help. Kudos appreciated.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

2 REPLIES 2
some_bih
Super User
Super User

Hi @adj87 I think one of the way is to get Commision Key (column which is not in your overview, but should be) into Sales / Fact table as calculated column on wanted level (order or what you need). Additioanal ideas could be found on link https://www.daxpatterns.com/dynamic-segmentation/ 

Hope this help. Kudos appreciated.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Thanks @some_bih  for the response. I forgot about the use of Patterns in this instance, they will certainly help with a secondary issue I was running into.

 

I was able to add the commission structures to my sales tables. I included a few IF statements, a SUMMARIZED table to sum the commissions by ID and Week and everything is correct.

 

The main reason I had dismissed this method is it hard coded the tiers and the purpose of this project is to compare Current Tiers vs Proposed Tiers, so I will just have to find a different way to do that 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.