Forum Discussion
Anonymous
4 years agoNot applicable
Return multiple values from a column based on duplicates
I have a measure that calculates and returns a scalar MAX from a column. Using this MAX value, I want to return a concatenated string from another column, especially if the table has duplicates. ...
- 4 years ago
Hey Anonymous,
try this code. For me it worked perfectly.Measure = CONCATENATEX( Filter('PlayerScore',PlayerScore[Score] = Max(PlayerScore[Score])),PlayerScore[Name] ,", ")
smpa01
Community Champion
4 years agoAnonymous try this
_concat =
CONCATENATEX (
FILTER (
tbl,
CALCULATE ( COUNT ( tbl[Name] ), ALLEXCEPT ( tbl, tbl[Score] ) ) > 1
),
tbl[Name],
",",
tbl[Name], ASC
)
Anonymous
4 years agoNot applicable
Thank you for responding. But this solution doesn't work at 'scale', as the table can have any number of rows.
| Name | Score |
| Jason | 3 |
| Bob | 3 |
| Nancy | 1 |
| Paul | 5 |
| Eric | 3 |
| Devon | 5 |
| Alex | 5 |
and so on..
I want to get all the names with max score (which could be change depending on new data) and return it as a string. For the above example, now 5 is the max score and the expected output would be 'Paul, Devon, Alex'.
Apologies if I wasn't clear in my original post!