The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Solved! Go to Solution.
WinRate =
VAR total = COUNTROWS('YourTable')
VAR won = CALCULATE(
COUNTROWS('YourTable'),
YourTable[won] = TRUE()
)
RETURN DIVIDE(won, total)
WinRate =
VAR total = COUNTROWS('YourTable')
VAR won = CALCULATE(
COUNTROWS('YourTable'),
YourTable[won] = TRUE()
)
RETURN DIVIDE(won, total)
Thank you very much!
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |