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

Win rate % not filtering by date slicer

I'm trying to calculate the win rate of our sales opportunities, I have used the following measure to calculate the win rate %

 

Win Rate = CALCULATE(COUNT(opportunities[name]),FILTER(opportunities,[Status]="Won")) / CALCULATE(COUNT(opportunities[name]),ALL(opportunities))

However the result I'm getting doesn't appear to be calculated correctly due to my date slicer, as shown in the screenshot below the win rate is calculated at 17.96% however looking at the total opportunities and total won opportunties it should actually be 24.67%

OpportunityWinRate.png

 

I think this is because of the date slicer shown in the screenshot but I can't figure out what I need to change about my measure to make this work.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @procurtstinate,

 

When you add a ALL to your formulas it gets all the information removing the slicer from the filters.

 

In this case you should use the measure like this.

 

Win Rate = CALCULATE(COUNT(opportunities[name]),FILTER(opportunities,[Status]="Won")) / CALCULATE(COUNT(opportunities[name]))

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
jthomson
Solution Sage
Solution Sage

Not entirely sure why you need an ALL statement in the denominator of your measure, it seems completely superfluous and is probably causing the incorrect results by ignoring the date slicer

MFelix
Super User
Super User

Hi @procurtstinate,

 

When you add a ALL to your formulas it gets all the information removing the slicer from the filters.

 

In this case you should use the measure like this.

 

Win Rate = CALCULATE(COUNT(opportunities[name]),FILTER(opportunities,[Status]="Won")) / CALCULATE(COUNT(opportunities[name]))

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



It's as simple as that! Thanks for the tip, problem solved Smiley Happy

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.