web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / max() value of a column
Power Automate
Unanswered

max() value of a column

(0) ShareShare
ReportReport
Posted on by 932

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.

 

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: max() value of a column

    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

  • BenDonahue Profile Picture
    932 on at
    Re: max() value of a column

    @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.

  • Verified answer
    abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: max() value of a column

    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

  • BenDonahue Profile Picture
    932 on at
    Re: max() value of a column

    Love it. Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard