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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mohammedald
Helper I
Helper I

Winning Ratio Calculation

Hello how are you guys I hope you are doing well, I have a rather complicated measurement I want to make ( complicated  for me ) I have a Sales data set from a company and I want to make a win Ratio calculation before I show you the calculation I want to show you the dataset in excel just so that you understand the calculation

Screenshot 2023-03-05 191328.jpg

 

 

 

now for the calculation, it's 2 calculations the first one is basically 

( win value + lost value ) = ( total ) --> ( win value / total ) = dollar winning ratio

here is an example ((( in the green )))

Screenshot 2023-03-05 190548.jpg

 

 

 

the second calculation is the 

( count of won deals + coun of lost deals ) = ( total ) --> ( count of won / total ) = Quantity winning ratio 

here is an example ((( in the green ))

Screenshot 2023-03-05 190841.jpg

 

 

 

Now my problem rises when I want to make this calculation automated in Power Bi or Excel I don't know how I can tell the DAX language to make a measurement where he takes the lost deals and count them + take the won deals and count them and then dived the count of the won deals by the total and on top of that to tell it to only take deals from 2023 and up 

 

I will show you a picture of how I want it to be in the dashboard *Note that I do this manually every time there is a new deal in won or lost * 

Screenshot 2023-03-05 192149.jpg

 

I really looked for a solution everywhere but the problem is none of the solutions have the same variables as mine ( multiple Deal Stages, Count of the won deals and the lost deals, the value of won and lost, 2023 and up ) 

 

I know this is a lot but I will appreciate your help thank you in advance. 

here is the link for the Power Bi in Google Drive

https://drive.google.com/file/d/1Fo-36yiNSTEo9DjXElMztm_YrOV53SjY/view?usp=share_link

1 ACCEPTED SOLUTION
Padycosmos
Solution Sage
Solution Sage

The following measures work:

Winning Dollar Ratio = DIVIDE(CALCULATE(SUM(Test[Price]),Test[Deal Status]="Won" && YEAR(Test[Est Close Date])>=2023), CALCULATE(SUM(Test[Price]),YEAR(Test[Est Close Date])>=2023 && (Test[Deal Status]="Won"|| Test[Deal Status]="Lost")))
Winning Quantity Ratio = DIVIDE(CALCULATE(COUNT(Test[Deal Status]),Test[Deal Status]="Won" && YEAR(Test[Est Close Date])>=2023), CALCULATE(COUNT(Test[Deal Status]),YEAR(Test[Est Close Date])>=2023 && (Test[Deal Status]="Won"|| Test[Deal Status]="Lost")))
Padycosmos_0-1678042974109.png

 

View solution in original post

2 REPLIES 2
Padycosmos
Solution Sage
Solution Sage

The following measures work:

Winning Dollar Ratio = DIVIDE(CALCULATE(SUM(Test[Price]),Test[Deal Status]="Won" && YEAR(Test[Est Close Date])>=2023), CALCULATE(SUM(Test[Price]),YEAR(Test[Est Close Date])>=2023 && (Test[Deal Status]="Won"|| Test[Deal Status]="Lost")))
Winning Quantity Ratio = DIVIDE(CALCULATE(COUNT(Test[Deal Status]),Test[Deal Status]="Won" && YEAR(Test[Est Close Date])>=2023), CALCULATE(COUNT(Test[Deal Status]),YEAR(Test[Est Close Date])>=2023 && (Test[Deal Status]="Won"|| Test[Deal Status]="Lost")))
Padycosmos_0-1678042974109.png

 

Thank you so much

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.