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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
benjamin_sasin
Resolver I
Resolver I

Max of Column in Power Query

I'm trying to get the maximum value from colum in a table on Power Query (not Power BI) and I just can't seem to be able to do it:

 

  • List.Max([column]) won't work.
  • List.Max({[column]}) returns the value of that colum on a row.
  • List.Max(Table.Column(Table, [Column])) won't work due to cyclic reference.
  • Table.Max(Table, Column) like the above will have a cyclic referene.

 

What's the trick here? Please help.

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

Hi @benjamin_sasin ,

 

What type of data are you trying to get the max value ?

 

Sometimes you have to refer to the table before, like:

 

List.Max(PreviousStepName[Column])

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
camargos88
Community Champion
Community Champion

Hi @benjamin_sasin ,

 

What type of data are you trying to get the max value ?

 

Sometimes you have to refer to the table before, like:

 

List.Max(PreviousStepName[Column])

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Okay I got it thanks.

 

So List.Max(#"PreviousStep"[ColumnName]) it is.

 

Why is this not in the List.Max function documentation? 😞

Hi @benjamin_sasin ,

 

I'm glad it worked.

 

Check this link: https://docs.microsoft.com/en-us/powerquery-m/list-max

 

It doesn't have a lot of examples, but it's good to have an idea.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors