Forum Discussion
madhav2020
6 years agoFrequent Visitor
Maximum occuring unique value in a column
how to write a query to get maximum occuring unique value and its count in a column ? Manager Sujith Ajay Joseph Sujith Sujith In the above table i would like to see answer as sujit-3 as...
- 6 years ago
Hi madhav2020
if you prefer to do it in DAX, you can create a measure and place it in a card visual:
Measure 2 = VAR t_ = ADDCOLUMNS(DISTINCT(Table2[Manager]), "Count_", CALCULATE(COUNT(Table2[Manager]))) VAR max_ = MAXX(t_,[Count_]) RETURN CONCATENATEX(FILTER(t_, [Count_] = max_),[Manager]&"-"&[Count_],", ")Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
AlB
6 years agoCommunity Champion
Hi madhav2020
if you prefer to do it in DAX, you can create a measure and place it in a card visual:
Measure 2 =
VAR t_ = ADDCOLUMNS(DISTINCT(Table2[Manager]), "Count_", CALCULATE(COUNT(Table2[Manager])))
VAR max_ = MAXX(t_,[Count_])
RETURN
CONCATENATEX(FILTER(t_, [Count_] = max_),[Manager]&"-"&[Count_],", ")
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
madhav2020
6 years agoFrequent Visitor
@AIB Thanks for the DAX query. It worked for my case. 🙂