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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

win rate with filter

Hello PBI Community,   

 

I have the current win rate formula but would like to constrain it (via formula) to only those opportunities that are above $1,000,000.  

 

I can then compare it to our overall win rate to see how we are doing overall versus the win rate of just our larger opportunties (which is a much smaller cohort)    Any help is much appreciated.  

 

WinRate = DIVIDE (
    CALCULATE (
        COUNT ( 'AllOpps-Products'[Description] ),
        FILTER ( ALL ( 'AllOpps-Products' ), 'AllOpps-Products'[New Status] = "Won" )
    ),
    CALCULATE (
        COUNT ( 'AllOpps-Products'[Description] ),
        FILTER (
            ALL ( 'AllOpps-Products' ),
            'AllOpps-Products'[New Status] = "Won"
                || 'AllOpps-Products'[New Status] = "Lost"
        )
    )
)
7 REPLIES 7
Anonymous
Not applicable

HI @Anonymous,

If you want to keep the original filter effects on your formulas, I'd like to suggest you use allselected function replace all. (notice: all function will ignore current filter effects)

Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT 

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Anonymous , Try like

if opportunities value is a column where value should be > 1000000

WinRate = DIVIDE (
CALCULATE (
COUNT ( 'AllOpps-Products'[Description] ),
FILTER ( ALL ( 'AllOpps-Products' ), 'AllOpps-Products'[New Status] = "Won" && 'AllOpps-Products'[New Status]>1000000 )
),
CALCULATE (
COUNT ( 'AllOpps-Products'[Description] ),
FILTER (
ALL ( 'AllOpps-Products' ),
'AllOpps-Products'[New Status] in{ "Won", "Lost"} && 'AllOpps-Products'[New Status]>1000000 )
)
)



if this a opportunities value is a measure

Averagex(filter(summarize( 'AllOpps-Products','AllOpps-Products'[opportunity_id],"_1" ,sum('AllOpps-Products'[opportunities value]),
"_2",CALCULATE (
COUNT ( 'AllOpps-Products'[Description] ),
FILTER ( ALL ( 'AllOpps-Products' ), 'AllOpps-Products'[New Status] = "Won" )
) ,"_3", CALCULATE (
COUNT ( 'AllOpps-Products'[Description] ),
FILTER (
ALL ( 'AllOpps-Products' ),
'AllOpps-Products'[New Status] in{ "Won", "Lost"} )
)),[_1] >1000000 ) Divide([_2],[_3]))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandakand @Ashish_Mathur     Hi Guys - Thank you for the feedback.  

 

Amit - The measure formula actually gave me the exact same result as my original formula, which is strange.   The column formula did not result in a percent...but a dollar value.    I changed the "new status" to "sales potential" in the last part of the formulas because that is the value field, but even after converting to a percent, the answer was 754% which is not correct.   

 

Ashish - Your formula resulted in a number of 35.7% which is slightly lower than our overall 39.76% (overall win rate, depending on the formula I use).   It could be correct, but I'd want to check it manually.     If I use a different formula (my original formula I posted), I get a win rate of 86%.   I beleive the difference is the formula below is calculating won opportunities versus all opportunities (dividing "won" opportunities over all opportunties).    The other formula is calculating won versus  won/lost.  

 

Win Rate = CALCULATE(COUNT('AllOpps-Products'[Description]),FILTER('AllOpps-Products',[New Status]="WON")) / CALCULATE(COUNT('AllOpps-Products'[Description]),ALL('AllOpps-Products'))

 

 

 

 

 

 

Hi,

Check it and let me know whether my result is correct or not.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur 

 

The formula below looks at ALL of the won opportunities versus the won/lost.     I simply want the same basic result...but with a filter that only looks at those opportunities ("Description") that are $1,000,000 or above.  

 

So, for example, our overall win rate might be 64%.     But our win rate for deals over $1 million might only be 38%.  

 

WinRate = DIVIDE (
    CALCULATE (
        COUNT ( 'AllOpps-Products'[Description] ),
        FILTER ( ALL ( 'AllOpps-Products' ), 'AllOpps-Products'[New Status] = "Won" )
    ),
    CALCULATE (
        COUNT ( 'AllOpps-Products'[Description] ),
        FILTER (
            ALL ( 'AllOpps-Products' ),
            'AllOpps-Products'[New Status] = "Won"
                || 'AllOpps-Products'[New Status] = "Lost"
        )
    )
)

Hi,

Does this measure work?

WinRate = DIVIDE (
    CALCULATE (
        COUNT ( 'AllOpps-Products'[Description] ),
        FILTER ( ALL ( 'AllOpps-Products' ), 'AllOpps-Products'[New Status] = "Won" && 'AllOpps-Products'[Description] >= 1000000)
    ),
    CALCULATE (
        COUNT ( 'AllOpps-Products'[Description] ),
        FILTER (
            ALL ( 'AllOpps-Products' ),
            ('AllOpps-Products'[New Status] = "Won"
                || 'AllOpps-Products'[New Status] = "Lost") && 'AllOpps-Products'[Description] >= 1000000
        )
    )
)

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.