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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Poornima2023
Helper I
Helper I

Formula to create win%

I need help in making measure where in I want to calculate Win%=Win/(Loss+Win)(The data contains pipeline where status is win, lost and active)

 

Please help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Poornima2023 ,

Please try to create a measure with below dax formula:

Win% =
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Status] = "Won" )
VAR tmp1 =
    FILTER ( ALL ( 'Table' ), 'Table'[Status] IN { "Lost", "Won" } )
VAR _a =
    SUMX ( tmp, [Value] )
VAR _b =
    SUMX ( tmp1, [Value] )
RETURN
    FORMAT ( DIVIDE ( _a, _b ), "Percent" )

vbinbinyumsft_0-1694505255007.png

For more details, please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Poornima2023 ,

Please try to create a measure with below dax formula:

Win% =
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Status] = "Won" )
VAR tmp1 =
    FILTER ( ALL ( 'Table' ), 'Table'[Status] IN { "Lost", "Won" } )
VAR _a =
    SUMX ( tmp, [Value] )
VAR _b =
    SUMX ( tmp1, [Value] )
RETURN
    FORMAT ( DIVIDE ( _a, _b ), "Percent" )

vbinbinyumsft_0-1694505255007.png

For more details, please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Poornima2023
Helper I
Helper I

There is single table in which status is marked as lost, win and active.

 

The win% formula needs to be win%=won/(lost+won)

 

Example of table is as below:

Projetc Name

ValueStatus

A

5Won

B

10Won
C100Lost
D40Active

 

vinodDrinkPak
Helper II
Helper II

@Poornima2023 

 

Win Percentage =
DIVIDE(
CALCULATE(
COUNTROWS('Pipeline'),
'Pipeline'[Status] = "Win"
),
CALCULATE(
COUNTROWS('Pipeline'),
'Pipeline'[Status] = "Win" || 'Pipeline'[Status] = "Lost"
),
0
)

chonchar
Helper V
Helper V

Hi, 

 

Try this:

 

Win percentage = divide(sum(loss[loss table]),sum(win[win table]))

 

That is not formatted properly, but that should work. 

 

Best,

 

Cam

Notes on the divide function:

-DAX has a safeguard for DIV/0

-You must aggregate the total first, and then divide

-There is a potential for a 3rd argument after the 2 parentheses, which is basically the end of an “IF” function in Excel, which means if you get null or 0, the last argument will return whatever you want it to be.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors