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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Getting the max value ...
Power Automate
Unanswered

Getting the max value of a column from SharePoint Lists with more than 10000 items

(0) ShareShare
ReportReport
Posted on by 321

Hi everyone,

I have an auction list with column Bid Amount. I want to get the highest Bid Amount associated with a distinct Bid ID

Categories:
  • srduval Profile Picture
    1,796 Moderator on at

    What is your triggering mechanism for this flow?

  • codeworks Profile Picture
    321 on at

    Automated Cloud Flow - When an Item is created

  • srduval Profile Picture
    1,796 Moderator on at

    In the trigger body, you should have the bid id, you will need to add a get items action and include an odata filter for bid ID eq {bid id from the trigger body} then you should be able to use a compose with an expression max(get items output, bid amount) and that should then return your highest bid amount

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    Not exactly what you wanted, but I hope this helps:

    Chriddle_0-1712670122971.png

    Bids is a Compose that creates an array of 10000 objects like this with random values

    Chriddle_1-1712670201760.png

    From:

     

    range(0,10000)

     

    Map id:

     

    rand(0,100)

     

    Map bid:

     

    rand(1, 100000)

     

     

    Select

    From (Creates an array of unique ids):

     

    xpath(
    	xml(json(concat('{"Root":{"Item":', body('Bids'),'}}'))),
    	'//id[not(preceding::id=.)]/text()'
    )

     

     Map id:

     

    item()

     

    Map maxid:

     

    max(
    	json(
    		replace(
    			string(
    				xpath(
    					xml(json(concat('{"Root":{"Item":', body('Bids'),'}}'))),
    					concat('//Item[id="', item(), '"]/bid/text()')
    				)
    			),
    			'"',
    			''
    		)
    	)
    )

     

     

    It takes just a few seconds to get an array of ids with max bids:

    Chriddle_2-1712670611221.png

     

    Even faster with XML creation in one additional step:

    Chriddle_0-1712671013794.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard