Forum Discussion
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%
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.
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
3 Replies
- MFelix
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
- procurtstinateFrequent Visitor
It's as simple as that! Thanks for the tip, problem solved :smileyhappy:
- jthomson
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