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 Apps / Getting the max value ...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 2

Hi Experts

 

What is the best approach to get the maximum value of a number type column in lists using the SharePoint connector?

 

I have tried the following.

 

The first one works but gives warning that it may not work on large datasets. 

Set(VarPlanID,Max(RTR_WorkOrders,WorkOrder));

 

The second one works sometime and sometimes it doesn't.

Set(VarPlanID,First(Sort(RTR_WorkOrders,WorkOrder,SortOrder.Descending)).WorkOrder+1);

 

Could you experts please enlighten me on the best approach to get this done without overheads?

 

This list has 10k rows and grows 5k per year

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @bkshemeer ,

     

    Generally, we use the second method to get the largest number in a list column. However, if the list includes huge amount of data, it may also get incorrect result. For this case, you can call a flow in your App and get the result.

    vjefferni_0-1682046758290.png

     

    In PowerApps:

    Set(VarPlanID,Flow.Run().WorkOrder);

     

    Best regards,

  • shemeer Profile Picture
    21 on at

    Thanks for the reply, the preferred approach and the solution. Appreciate it. Have a good time ahead 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard