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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Pan_Forex
Helper III
Helper III

Winrate calculated by TRUE OF FALSE

Hello, I would like to count the winrate % for each player. I have a table with 2 columns [player] and [won]. The player column is text and won is TRUE/FALSE. 

1 ACCEPTED SOLUTION
lukiz84
Memorable Member
Memorable Member

WinRate = 
   VAR total = COUNTROWS('YourTable')
   VAR won = CALCULATE(
       COUNTROWS('YourTable'),
       YourTable[won] = TRUE()
   )

   RETURN DIVIDE(won, total)

View solution in original post

2 REPLIES 2
lukiz84
Memorable Member
Memorable Member

WinRate = 
   VAR total = COUNTROWS('YourTable')
   VAR won = CALCULATE(
       COUNTROWS('YourTable'),
       YourTable[won] = TRUE()
   )

   RETURN DIVIDE(won, total)

Thank you very much!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.