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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Happy Friday!
I am trying to extract data specific for each group from one column in a table based on finding the maximum value in another column.
I have the following setup
Key = column by which data is to be grouped
Reference = The column I wish to use to identify/manipulate data
Value = The values I want to output
Scenario 1
I wish to find the corresponding value for the maximum reference within a group:
Scenario 2
(I may be pushing my luck here!)
I wish use the numbers in the Reference column to perform an operation upon the value column - here it is Average(Reference x Value). I am less fussed about the exact formulation here but the method I can apply
I would be hugely greatful for any ideas/solutions
Thanks!
Solved! Go to Solution.
you should group by on key using UI (for example) in this way:
Thanks for your reply, as far as I can tell the Group GUI only allows operations on one column. In scenario 1 I am not really interested in the max of R but which V is on the same row as th max of R.
Sorry if I am missing something in your reply
try using this M-expression
then expand column records:
Perfect. Thanks for your time on that. I think I understand the syntax of the solution apart from the "_". If you have a moment could you explain what that is up to or point me towards the documentation.
Thanks again
You can just add a MAX operation on the Value column right from the Group function GUI. Also add an All Rows column. That should give you what you are looking for. You'll have what you need to then add the average column.
--Nate
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.