cancel
Showing results for
Did you mean:
Helper II

## Calculating Achived Targets for different levels

Hi guys.

I came up with a problem that has to do with sales targets and rate of achievement. So we have 2 business units (A and B). Every BU has its salesmen (x,y,z). Every salesman has monthly targets for sales. At the end of the month, we can calculate the achieved targets, meaning sales over target per month per salesman

So we can see that we achieved 3 of 6 targets, which gives a 50% success rate.

I want to create a calculated measure to calculate the success rate per BU per month (ignoring the salesmen). As we can see for 2022-7, business unit A had a target of 25E (10+15) and sold 24E (9+15), which gives a success rate of 0%. For 2022-8 with a total target of 38E sold 38E which gives 100% and so on. Is it possible to calculate the above?

Kostas

1 ACCEPTED SOLUTION
Super User

 Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is beyond their comprehension! DAX is simple, but NOT EASY!
2 REPLIES 2
Super User

 Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is beyond their comprehension! DAX is simple, but NOT EASY!
Resolver II

I created a calculated column doing what you want :

BU sucess =
Var actual = CALCULATE(Sum(Table5[Actual Sales]),Filter(Table5,
&&
Table5[Month].[Month] == EARLIER(Table5[Month].[Month])))

var expected = CALCULATE(Sum(Table5[Sales Target]),Filter(Table5,
&&
Table5[Month].[Month] == EARLIER(Table5[Month].[Month])))

Return (IF(actual >= expected,100,0))

Basically you have 2 variables summing expected and actual sales by month and business unit.

You can change the return if you want the accurante percentage by doing the calcul in the IF Condition.

Best regards,

Announcements

#### CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

#### Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

#### European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

#### Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors