Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
DDON
Frequent Visitor

Data maniplulation after grouping

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

 

DDON_1-1619207372330.png

 

 

Scenario 1

I wish to find the corresponding value for the maximum reference within a group:

DDON_0-1619207305836.png

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

 

DDON_2-1619208009017.png

 

I would be hugely greatful for any ideas/solutions


Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

image.png

 

try using this M-expression

 

image.png

 

 

 

then expand column records:

 

image.png

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

 

image.png

 

you should group by on key using UI (for example) in this way:

 

image.png

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

Anonymous
Not applicable

image.png

 

try using this M-expression

 

image.png

 

 

 

then expand column records:

 

image.png

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

Anonymous
Not applicable

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.