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
ccmiller10
Frequent Visitor

Calculating how many orders needed to surpass the highest salesman by percentage of quota

I'm ranking the salesman by who has the best percentage of quota met. So for example, if Salesman A had a target of 8 orders for the year but they sold 24 than they'd have met 300% of their goal. My request is how to get how many more orders would the other salesman need in order to surpass the 300%. For example, Salesman B had a different target of 6 orders but got 11 sales so far which would be 183%, how many more orders would they need to get to or surpass the leader who has 300%?

 

I was thinking of doing a measure with variables where I'd calculate the max of the percentage of quota first and then I wasn't sure how to calculate the rest since their target of orders could differ between each salesman.

 

%ofQuota,orders,target.PNG

 

Thanks for any help!

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@ccmiller10 

Give this a try.

Order to reach max = 
VAR _TopPct = CALCULATE( MAXX ( VALUES ( 'table'[sales rep] ), [Percent of Taget Quota] ), ALL ( 'Table'[Sales Rep] ) )
VAR _TotalOrders = _TopPct * [Quota]
VAR _Remaining = _TotalOrders - [Order Count]
RETURN _Remaining

jdbuchanan71_0-1664811253130.png

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@ccmiller10 

Give this a try.

Order to reach max = 
VAR _TopPct = CALCULATE( MAXX ( VALUES ( 'table'[sales rep] ), [Percent of Taget Quota] ), ALL ( 'Table'[Sales Rep] ) )
VAR _TotalOrders = _TopPct * [Quota]
VAR _Remaining = _TotalOrders - [Order Count]
RETURN _Remaining

jdbuchanan71_0-1664811253130.png

 

This worked for me! Thank you so much for the help!

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.