Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
kostask
Helper II
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

1.PNG

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?

Thank you in advance for your time!

Kostas

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1664221038190.png


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 still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1664221038190.png


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 still way beyond their comprehension!

DAX is simple, but NOT EASY!

philouduv
Resolver III
Resolver III

Hey @kostask ,

I created a calculated column doing what you want :

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

var expected = CALCULATE(Sum(Table5[Sales Target]),Filter(Table5,
Table5[Business Unit] == EARLIER(Table5[Business Unit])
&&
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,

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.