Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a small dataset with a column of questions, "Who is most likely to succeed?", "Who is Most likely to be a spy", etc. Then a column with employee responses. I am trying to do a calculated measure so I can see which name got the most votes for each question. I am able to get the number of answers for each question but I want to have a column that shows who got the most votes.
Question | Answer |
Who is most likely to Accidently put their shirt on backwards? | Steve |
Who is most likely to Accidently put their shirt on backwards? | Dave |
Who is most likely to Accidently put their shirt on backwards? | Mike |
Who is most likely to Accidently put their shirt on backwards? | Mike |
Who is most likely to Accidently put their shirt on backwards? | Mike |
Who is most likely to Accidently walk into a wall? | Joe |
Who is most likely to Accidently walk into a wall? | Larry |
Who is most likely to Accidently walk into a wall? | Larry |
Who is most likely to Accidently walk into a wall? | Bill |
So Question 1 next column would be Mike
2 would be Larry
Can anyone point me in the right direction?
Solved! Go to Solution.
@oneillp111 Try:
Measure =
VAR __Table = SUMMARIZE('Table',[Answer],"__Count",COUNTROWS('Table')
VAR __Max = MAXX(__Table,[__Count])
RETURN
MAXX(FILTER(__Table,[__Count] = __Max),[Answer])
or
Measure =
VAR __Table = SUMMARIZE('Table',[Answer],"__Count",COUNTROWS('Table')
VAR __Max = MAXX(__Table,[__Count])
RETURN
CONCATENATEX(FILTER(__Table,[__Count] = __Max),[Answer],", ")
@oneillp111 Try:
Measure =
VAR __Table = SUMMARIZE('Table',[Answer],"__Count",COUNTROWS('Table')
VAR __Max = MAXX(__Table,[__Count])
RETURN
MAXX(FILTER(__Table,[__Count] = __Max),[Answer])
or
Measure =
VAR __Table = SUMMARIZE('Table',[Answer],"__Count",COUNTROWS('Table')
VAR __Max = MAXX(__Table,[__Count])
RETURN
CONCATENATEX(FILTER(__Table,[__Count] = __Max),[Answer],", ")
thanks @Greg_Deckler , can you clarify somethings for me, what is "___Count" in line 2
@oneillp111 Just a variable name. I always prefix my variable names with a double underscore for whatever reason (mainly to prevent misidentification with columns and measures and such)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
52 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |