Forum Discussion
Adithya
10 years agoNew Member
DAX for getting distinct item and its count
I have a set of ids 1 2 3 1 1 2 4 5 5 and i want the id and its count 1 - 3 times 2 - 2 times 3 - 1 time 4 - 1 time 5 - 2 times and i have written a measure for the same Me...
- 10 years ago
Based on my test, here is one way for your reference.
Measure = MAXX ( Table1, Table1[Column1] ) & " - " & COUNTX ( Table1, Table1[Column1] ) & " time" & IF ( COUNTX ( Table1, Table1[Column1] ) > 1, "s", "" )
v-chuncz-msft
10 years agoCommunity Support
Based on my test, here is one way for your reference.
Measure =
MAXX ( Table1, Table1[Column1] ) & " - "
& COUNTX ( Table1, Table1[Column1] )
& " time"
& IF ( COUNTX ( Table1, Table1[Column1] ) > 1, "s", "" )