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.
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.
Solved! Go to Solution.
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
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsNot 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
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
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsIt's as simple as that! Thanks for the tip, problem solved
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |