The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
27 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |