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
Anonymous
Not applicable

Monthly Commission Orders by Salesperson Above Minimum Count

Example.png

 

I'm working on building a table that shows all Commissioned Orders. Only three columns are being used in the above measures: OrderNumber, OrderDate, & Salesperson. I've included sample data with the measures in a PBI file below. 

-In this example the business defines a commission order as all orders in a given month a salesperson gets above their first 400 orders.

-The commission per order in this example is $3.5 for each order after the first 400 in a month.

 

I'm currrently using the following measures & am looking for alternatives:

Commission Amount = [Commission Orders]*3.5
Commission Orders =

IF

(

COUNTROWS(VALUES(OrderData[Salesperson])) = 1,

[OrdersOver400],

SUMX(VALUES(OrderData[Salesperson]), [OrdersOver400])

)

OrdersOver400 = if(COUNT(OrderData[OrderNumber]) > 400, COUNT(OrderData[OrderNumber]) - 400, 0)


I'm unable to get the count for commission orders to display correctly when the values are low or 0.

 

SamplePBIX 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Found the solution: 

 

Commission Orders = SUMX(SUMMARIZE(OrderData,OrderData[Salesperson],OrderData[OrderDate].[Month]), [OrdersOver400])

View solution in original post

3 REPLIES 3
Tad17
Solution Sage
Solution Sage

Can you post an example of one that doesnt calculate correctly? Based on your description the screenshot looks correct.

 

Anonymous
Not applicable

Hi Tad17, 


Take a look at the incorrect total for Commission Orders. 

Anonymous
Not applicable

Found the solution: 

 

Commission Orders = SUMX(SUMMARIZE(OrderData,OrderData[Salesperson],OrderData[OrderDate].[Month]), [OrdersOver400])

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.