Forum Discussion
elle-queue
2 years agoFrequent Visitor
DAX expression to count value and return the label
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 Den...
- Anonymous2 years ago
1. DAX Expression to Return the Name of the Winner with the Most Wins
MostWinsWinner =
CALCULATE(
VALUES('Table'[Winner]),
TOPN(
1,
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins],
DESC
)
)2. DAX Expression to Return the Count of the Most Wins
MostWinsCount =
CALCULATE(
MAXX(
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins]
)
)
Anonymous
2 years agoNot applicable
1. DAX Expression to Return the Name of the Winner with the Most Wins
MostWinsWinner =
CALCULATE(
VALUES('Table'[Winner]),
TOPN(
1,
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins],
DESC
)
)
2. DAX Expression to Return the Count of the Most Wins
MostWinsCount =
CALCULATE(
MAXX(
SUMMARIZE(
'Table',
'Table'[Winner],
"Wins", COUNT('Table'[Winner])
),
[Wins]
)
)
elle-queue
2 years agoFrequent Visitor
Thank you so much - you've saved me so much time 😁
- Anonymous2 years agoNot applicable
No worry's I had a problem for myself and i know how Power BI is