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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jh292
Helper I
Helper I

Commission Calculations - Different rates and targets

Hi team, 

Can anyone help with what is probably an easy fix!

I have two data sources, 

1 - "Order Items" provides (on individual rows) -  Account Manger name (Column A), *the details of the sale* (lots of irrelevant fields), and the contract value of that sale (column Z for example). 
Repeats with other various sales row by row, 

 

Account Manager

Product

Sales No.

Contract Length Months

One off price

Monthly price

Contract Value

Joe Bloggs

Hats

1

12

500

50

£1,100.00

Suzie Smith

Hats

2

36

700

30

£1,780.00

Suzie Smith

Hats

3

24

650

50

£1,850.00

Suzie Smith

Shirts

4

24

1000

40

£1,960.00

Joe Bloggs

Hats

5

36

800

80

£3,680.00

Suzie Smith

Hats

6

24

450

60

£1,890.00

Suzie Smith

Trousers

7

12

0

40

£480.00

Joe Bloggs

Hats

8

3

100

50

£250.00

 

 

 

2 - "Commission Rates" a sheet with Account Manager names (relationship active against Account manager name between the sheets), their Target, over100% target, 75% target, 50% target, their 100% target commission rate, 75% commission rate, 50% commission rate. 
(Below 50% commission rate is 0%)

Account Manager

Target

100% Target

75% Target

50% Target

100% commission

75% commission

50% commission

Joe Bloggs

£5,000.00

£5,000.00

£3,750.00

£2,500.00

0.3

0.2

0.05

Suzie Smith

£15,000.00

£15,000.00

£11,250.00

£7,500.00

0.2

0.15

0.1

 

 

 

I use a simple measure

Total Contract Value = sum('Order Items'[Contract Value] )

to give me totals per person ("Total Contract Value") in a Matrix Visual. 

Account Manager

Order Contract Value

Commission

Joe Bloggs

£5,030.00

?

Suzie Smith

£7,960.00

?

 

My issue is calculating the commission.... both based on a certain sales person and where they are against target i.e. above 100%?, between 100-75, 75-50 or below 50%

 

Can someone help? No problem changing columns etc, can add custom columns if required etc etc.

Many thanks

 

James

 

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Hi, @jh292 

As to the table Commission Rates, it's a bit hard to apply filtering in DAX calculation, so I convert it to the following,

Account ManagerThresholdRate

Joe Bloggs50000.3
Joe Bloggs37500.2
Joe Bloggs25000.05
Suzie Smith150000.2
Suzie Smith112500.15
Suzie Smith75000.1

 

Accordingly, the measure to calculate commission is authored this way,

 

 

Commission = 
VAR __sales = [Total Contract Value]
VAR __comm_rate =
    MAXX (
        CALCULATETABLE (
            FILTER ( 'Commission Rates', 'Commission Rates'[Threshold] <= __sales ),
            TREATAS (
                VALUES ( 'Order Items'[Account Manager] ),
                'Commission Rates'[Account Manager]
            )
        ),
        'Commission Rates'[Rate]
    )
RETURN
    IF ( ISBLANK ( __comm_rate ), 0, __sales * __comm_rate )

 

 

Commission.png

I also attach the mockup file for your reference.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

1 REPLY 1
CNENFRNL
Community Champion
Community Champion

Hi, @jh292 

As to the table Commission Rates, it's a bit hard to apply filtering in DAX calculation, so I convert it to the following,

Account ManagerThresholdRate

Joe Bloggs50000.3
Joe Bloggs37500.2
Joe Bloggs25000.05
Suzie Smith150000.2
Suzie Smith112500.15
Suzie Smith75000.1

 

Accordingly, the measure to calculate commission is authored this way,

 

 

Commission = 
VAR __sales = [Total Contract Value]
VAR __comm_rate =
    MAXX (
        CALCULATETABLE (
            FILTER ( 'Commission Rates', 'Commission Rates'[Threshold] <= __sales ),
            TREATAS (
                VALUES ( 'Order Items'[Account Manager] ),
                'Commission Rates'[Account Manager]
            )
        ),
        'Commission Rates'[Rate]
    )
RETURN
    IF ( ISBLANK ( __comm_rate ), 0, __sales * __comm_rate )

 

 

Commission.png

I also attach the mockup file for your reference.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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