Others

Retrieve the Excel Row with the Maximum Value Using Power Automate

Natalie TaylorNatalie Taylor Oct 23, 2026 871 views

Question details

The user needs to find and retrieve the row with the highest value from an Excel table stored in SharePoint using cloud-based Power Automate.

How to Retrieve the Excel Row with the Maximum Value Using Power Automate
Product
Power Automate / Microsoft Excel
Device & OS
not provided
Scenario
Automating data extraction from an Excel spreadsheet hosted in SharePoint to isolate the row containing the maximum value in a specific column, strictly using a cloud flow without Power Automate Desktop.
Observed behavior
The user is seeking the exact cloud flow actions, configurations, or array expressions necessary to successfully locate and retrieve the target row.
Before you start

Ensure your Excel file is saved in a SharePoint document library or OneDrive for Business, and that the target data is formatted as an official Excel Table, as Power Automate requires defined tables to read rows.

Solution 1Recommended

Use Order By and Top Count in Cloud Flow

The most efficient way to find the row with the maximum value is by sorting the Excel table in descending order and retrieving only the top row.

By utilizing the built-in OData query options within the Excel Online connector, you can let Power Automate sort the data during the retrieval process rather than using complex array loops.

1
Add the Excel action

In your cloud flow, add the 'List rows present in a table' action. Select your SharePoint site, Document Library, target Excel File, and the specific Table.

2
Configure Order By

Click on 'Show advanced options'. In the 'Order By' field, type the exact internal name of the column you want to evaluate followed by a space and 'desc' (for example: Score desc).

3
Set Top Count

In the 'Top Count' field, enter '1'. This ensures the flow only pulls the single row containing the highest value from your designated column.

4
Utilize the output

Add a subsequent action, such as 'Compose' or 'Send an email', and use the dynamic content from the 'List rows' action to output the data from your maximum value row.

Use Order By and Top Count in Cloud Flow
Column Name Requirements: Ensure you are using the internal column name with no spaces in the 'Order By' field. If your column has spaces, you may need to remove them in Excel or use OData syntax to encapsulate the name.
Free Microsoft Office alternative

Looking for a Lightweight and Free Alternative to Microsoft Office?

If you manage large datasets, build complex spreadsheets, or simply need robust office software without heavy subscription fees, WPS Office is an excellent choice. It offers high compatibility with Microsoft file formats and a familiar user interface, making your transition seamless.

  1. 1. Download and Install: Download WPS Office for free from the official website and run the quick installer on your device.
  2. 2. Open Your Spreadsheets: Launch WPS Spreadsheet and seamlessly open any existing Microsoft Excel files without losing formatting.
  3. 3. Analyze Data Instantly: Use the familiar interface and extensive formula library to evaluate your data efficiently.
Fully compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint (.pptx) formats.Includes powerful built-in data analysis tools, pivot tables, and advanced formulas similar to Excel.Free to download and use with a lightweight installation that won't slow down your device.Cross-platform support allows you to edit spreadsheets on Windows, Mac, Linux, iOS, and Android.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Automate require an Excel Table to read rows?

Power Automate uses the Microsoft Graph API, which relies on defined named objects like Tables to structure and accurately query data. This prevents the flow from returning blank rows and avoids errors that frequently occur when interacting with dynamic or unformatted cell ranges.

Can I use the max() expression directly on an Excel column in a cloud flow?

You cannot directly apply the max() expression to a column directly from the Excel file source. You must first extract the data using the 'List rows present in a table' action, map the specific numerical column into a flat array using a 'Select' action, and then apply the max() function to that newly created array.

What if the 'Order By' query fails in the Excel connector?

If the OData 'Order By' query throws an error, first ensure you are using the exact internal column name without spaces. If the issue persists due to Excel connector limitations, retrieve all rows using 'List rows present in a table' without advanced options, and use the 'Filter Array' or manual loop actions to process the maximum value in memory.