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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
mayenscb
Regular Visitor

NFL Win %

I am trying to get a card to show the win % of teams that I have listed on a bar chart. The formula in excel would be =# of wins/(# of wins + # of losses). Is there a way I can do this in Power BI and the win % will change with each team selected?

1 ACCEPTED SOLUTION

Hi  @mayenscb ,

 

Create a measure as below:

Home win% = 
var _winscore=CALCULATE(SUM('Table'[Score_home]),FILTER(ALL('Table'),'Table'[team_home]=MAX('Table'[team_home])&&'Table'[Home team outcome]="Win"))
var _losescore=CALCULATE(SUM('Table'[Score_home]),FILTER(ALL('Table'),'Table'[team_home]=MAX('Table'[team_home])&&'Table'[Home team outcome]="Loss"))
Return
DIVIDE(_winscore,_winscore+_losescore)+0

And you will see:

v-kelly-msft_1-1614324842041.png

 

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@mayenscb , Do you have meausre for Win and Loss.

Try like

divide([Win#],[Win#]+[loss#])

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

Thank you for your help, below is a screenshot of the data that I am using. Columns G&J are the ones that I want to interface with each other. I want to know if a team is the home team what is their win%.

 

mayenscb_0-1614176939058.png

 

Hi  @mayenscb ,

 

Create a measure as below:

Home win% = 
var _winscore=CALCULATE(SUM('Table'[Score_home]),FILTER(ALL('Table'),'Table'[team_home]=MAX('Table'[team_home])&&'Table'[Home team outcome]="Win"))
var _losescore=CALCULATE(SUM('Table'[Score_home]),FILTER(ALL('Table'),'Table'[team_home]=MAX('Table'[team_home])&&'Table'[Home team outcome]="Loss"))
Return
DIVIDE(_winscore,_winscore+_losescore)+0

And you will see:

v-kelly-msft_1-1614324842041.png

 

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.