cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BenDonahue
Skilled Sharer
Skilled Sharer

max() value of a column

Is there a way to use max() to grab the maximum value from a column? 

 

I am using the Excel connector and the "List rows present in a table" block.

 

I am hoping for something like this:

max(body('ListRowsPresentInATable')?['Key'])

 

Otherwise, I guess I'll loop through the keys and append them to an array variable and max that, but the above approach would be quicker.

 

Thank you for your assistance.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
abm
Super User
Super User

Hi @BenDonahue 

 

Read the Excel Rows first. Use the Select action to get all the keys. This will return the array. Then use the max() expression for the array to get the number.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

Hi @BenDonahue 

 

There is an easy way to do this.

 

image.png

 

Above expression is as follows:

 

outputs('List_rows_present_in_a_table')?['body/value'][0]?['Age']

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @BenDonahue 

 

Read the Excel Rows first. Use the Select action to get all the keys. This will return the array. Then use the max() expression for the array to get the number.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
BenDonahue
Skilled Sharer
Skilled Sharer

@abm ,

Thank you for your help.

Can I impose for a bit more help, please?

I set up the Select block like this:

BenDonahue_0-1632491311050.png

Then tried to max Key column. This feels like the same issue I had to begin with.

 

I tried not using a Key column in Select and maxing the outputs, but no luck with that either.

 

1. Am I using the Select block correctly?

2. What is the syntax in the following Compose block?

 

Thank you, again, for your help, abm.

Hi @BenDonahue 

 

There is an easy way to do this.

 

image.png

 

Above expression is as follows:

 

outputs('List_rows_present_in_a_table')?['body/value'][0]?['Age']

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Love it. Thank you.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,750)