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

Calculating different incentives when the number of units changed

Hi all,

I have encountered a problem when calculating incentives.

 

incentive.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is the incentive table for each salesperson when they have sold the number of units required.

 

table.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

This is an example of how it would be like if I split it among the salespeople.

 

The total units are correct.

However, the total $ amount is calculated as 115 units X $500 instead of the individual amount.

The total incentive should have been $54,900 instead of $57,500.

 

Any idea how I am able to solve this such that the amount would show $54,900 instead of $500 X 115 Units?

 

 

Some background information:

 

Units are derived from the count of filtered values of a row:

Units = 
CALCULATE(COUNTA('2019'[Buyer]), '2019'[Buyer] IN { "PR" })

 

Then the incentive is as follow:

Incentive = 
IF([Units] >= 7, (500*[Units]),
    IF([Units] = 6, (450*[Units]),
        IF([Units] = 5, (400*[Units]),
            IF([Units] = 4, (350*[Units]),
                IF([Units] = 3, (300*[Units]),
                    IF([Units] = 2, (250*[Units]),
                        IF([Units] = 1, (200*[Units]), 0)
                    )
                )
            )
        )
    )
)

Many thanks in advance.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

You could refer to below formula:

Measure = SUMX('Salesperson','2019'[Incentive])

Result:

1.PNG

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-danhe-msft
Employee
Employee

Hi @Anonymous ,

I could not reproduce your [units] coulumn:

Units = 
CALCULATE(COUNTA('2019'[Buyer]), '2019'[Buyer] IN { "PR" })

Could you please share your pbix file to have a test if possible?

 

Regards,

Daniel He 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Daniel,

 

Thanks for the reply!

 

I have attached the pbix file with dummy data.

https://1drv.ms/u/s!Att5ET2256YlhRt14L7UBYzrqtCI

 

Thanks.

Hi @Anonymous ,

You could refer to below formula:

Measure = SUMX('Salesperson','2019'[Incentive])

Result:

1.PNG

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks @v-danhe-msft !

 

Got the results that i wanted.

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.