Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi everyone,
Im a beginner on power bi and dax and I've been struggling on a subject of my own.
I was parsing the polls for 2024 and decided to make a data analysis subject about it.
Unfortunately the answer to my question didn't exist as I searched on various forums.
So, I need to calculate the maximum of two lines as per the image below.
I thought about storing the values for each question poll in a variable but thing is, i don't think it is possible since power bi read
each row.
Would anyone have any ideas? Best regards
I would like to have the candidate name with the highest percent for each question_id poll over 2 or 3 rows
Hi, @FVM411
try below
winner =
var name = table[candidate name]
var percentage = table[percantage]
var curr_qu_id = table[question_id]
return
Minx(
filter(
table,
table[question_id] = curr_qu_id
),
name &" "& percentage
)
Thank you for your answer but it doesn't work, i get the same result.
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |