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
gauravnarchal
Post Prodigy
Post Prodigy

Calculate Sales Incentive

Hello - I want to create an incentive table for my sales team as per the below conditions

 

First condition

Calculate the Incentive % slab they fall in as per the individual monthly targets

 

Second condition

Calculate the payout amount based on their individual sales agent payout amount

 

Table 1 - Individual Sales Agent Targets Table

 

Sale AgentMonthly Target
ABC150,000
DEF155,000

 

Table 2 - Sales Table

 

Sale AgentSale AmountMonth
ABC240,000Oct-21
DEF300,000Oct-21
ABC100,000Nov-21
DEF90,000Nov-21
ABC180,000Dec-21
DEF220,000Dec-21

 

Below (Indivudal) Incentive slab is not a table, can we add the conditions in the DAX/Measure for each sales agent?

 

Sale Agent - ABC Incentive  
FromToIncentive Amount
0%20%2,000
20%30%2,500
30%40%3,000
40%50%3,500
50%And above4,000

 

 

Sale Agent DEF Incentive  
FromToIncentive Amount
0%20%500
20%30%1,000
30%40%1,500
40%50%2,000
50%And above2,500

 

Result First Condition

gauravnarchal_1-1641920415580.png

 

Result Second Condition

gauravnarchal_2-1641920457920.png

1 ACCEPTED SOLUTION
DataZoe
Employee
Employee

@gauravnarchal I was able to do this:

 

DataZoe_0-1641925028248.png

 

by creating a Sales Agent table, then joining to the Sales by Month, Target, and Incentives table:

 

Modeling > New Table:

Sales Agent = DISTINCT('Sales by Month'[Sale Agent])
 
Relationships:

DataZoe_1-1641925079230.png

 

Sales by Month:

DataZoe_2-1641925143720.png

 

 

Monthly Targets:

DataZoe_3-1641925164680.png

 

Incentives:

DataZoe_4-1641925191933.png

The To and From need to be decimals

 

Measures:

Sales = sum('Sales by Month'[Sale Amount])
 
Target Sales = sumx('Sales by Month',sum('Monthly Targets'[Monthly Target]))
 
Target % =
divide([Sales]-[Target Sales],[Target Sales])
 
Awarded Incentive =
var t = [Target %]
return
sumx('Sales by Month',
CALCULATE(sum(Incentives[Incentive Amount]),t > Incentives[From] && (t <= Incentives[To] || isblank(Incentives[To]))))

 

I've also attached the PBIX. 

 

Hope this helps!

 

 

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

1 REPLY 1
DataZoe
Employee
Employee

@gauravnarchal I was able to do this:

 

DataZoe_0-1641925028248.png

 

by creating a Sales Agent table, then joining to the Sales by Month, Target, and Incentives table:

 

Modeling > New Table:

Sales Agent = DISTINCT('Sales by Month'[Sale Agent])
 
Relationships:

DataZoe_1-1641925079230.png

 

Sales by Month:

DataZoe_2-1641925143720.png

 

 

Monthly Targets:

DataZoe_3-1641925164680.png

 

Incentives:

DataZoe_4-1641925191933.png

The To and From need to be decimals

 

Measures:

Sales = sum('Sales by Month'[Sale Amount])
 
Target Sales = sumx('Sales by Month',sum('Monthly Targets'[Monthly Target]))
 
Target % =
divide([Sales]-[Target Sales],[Target Sales])
 
Awarded Incentive =
var t = [Target %]
return
sumx('Sales by Month',
CALCULATE(sum(Incentives[Incentive Amount]),t > Incentives[From] && (t <= Incentives[To] || isblank(Incentives[To]))))

 

I've also attached the PBIX. 

 

Hope this helps!

 

 

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

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.