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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
datadonuts
Advocate II
Advocate II

Commission calculation in a measure

I guess for most of you that's a fairly simple task, unfortunately not for me.

I am trying to calculate the commission on sales depending on a country table:

'Sales Territory'[Country] ) = "United States" gets 15% commission, all other countries get 10%.

 

With a calculated column that's straight forward, but I want a measure.

 

Calculated column commission =
IF (
RELATED ( 'Sales Territory'[Country] ) = "United States",
[Revenue] * 0.15,
[Revenue] * 0.1
)
 
Expected ResultExpected Result
 
I tried my way through CALCULATE and IF or SWITCH, but no way to get any close to a solution. The closest I could get is:
 
Sales Commissions =
[Revenue]
* IF (
HASONEVALUE ( 'Sales Territory'[Country] ),
IF ( VALUES ( 'Sales Territory'[Country] ) = "United States", 0.15, 0.1 )
)
 
But it doesn't show a total bc of the HASONEVALUE function.
 
Screenshot 2020-10-23 013406.jpg
 

 

 
Please help.
Thanks a lot!
 
 
Screenshot 2020-10-23 010344.jpg
 
 
 
 
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

@datadonuts please try this code

SUMX(VALUES('Sales Territory'[Country]),IF (
 'Sales Territory'[Country]  = "United States",
[Revenue] * 0.15,
[Revenue] * 0.1
))

View solution in original post

1 REPLY 1
wdx223_Daniel
Super User
Super User

@datadonuts please try this code

SUMX(VALUES('Sales Territory'[Country]),IF (
 'Sales Territory'[Country]  = "United States",
[Revenue] * 0.15,
[Revenue] * 0.1
))

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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