This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi all - I'm trying to create a DAX forumla that will return a data label (or value or category, not sure what to call it) based on the raw data below:
| Winner |
| Andy |
| Brenda |
| Craig |
| Denise |
| Andy |
| Brenda |
| Craig |
| Craig |
| Denise |
| Denise |
| Denise |
| Andy |
| Andy |
| Andy |
| Andy |
| Andy |
The summary data is:
| Winner | Won |
| Andy | 7 |
| Brenda | 2 |
| Craig | 3 |
| Denise | 4 |
| TOTAL | 16 |
We can see from the above table, that the "category" that won the most is Andy. I'm trying to create two DAX expressions that will count the total won by each category, and then return the name of that category, and the value of the category. So the results of each DAX expression would be: Andy and 7.
Is this possible? I hope I've explained this well enough. Thank you!
Solved! Go to Solution.
MostWinsWinner =
CALCULATE(
VALUES('Table'[Winner]),
TOPN(
1,
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins],
DESC
)
)
MostWinsCount =
CALCULATE(
MAXX(
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins]
)
)
MostWinsWinner =
CALCULATE(
VALUES('Table'[Winner]),
TOPN(
1,
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins],
DESC
)
)
MostWinsCount =
CALCULATE(
MAXX(
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins]
)
)
Thank you so much - you've saved me so much time 😁
No worry's I had a problem for myself and i know how Power BI is
OH wow, thank you so much! It was hard to look up the response myself because I didn't even know what search terms to use! But this is perfect, thank you so much!
MostWinsCount =
CALCULATE(
MAXX(
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins]
)
)
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 26 | |
| 25 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 42 | |
| 41 | |
| 40 | |
| 21 | |
| 20 |