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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Problems with Order by...
Power Automate
Unanswered

Problems with Order by in List rows from Excel

(0) ShareShare
ReportReport
Posted on by 13

Hi,

Im trying to make a flow where I need the row with highest ID (column in a table). I use the "List rows present in a table" operation.
In the advanced options it looks like this:

chsmebye_0-1694094976512.png

 

The problem is that the "order by" does not order anything for me. I always get the first Id (1) for the table. The table looks like this:

chsmebye_1-1694095147886.png


In this case i want the row with id 6. If I remove the "top count" the whole list is presented.


What have I missed?
Please help 🙂

 

- Christian

 

 

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @chsmebye 
    Can you add a Compose action after your List Rows Present in a Table action and remove the text in the Order By field and leave the Top Count to 1 and run a test? Upload a screenshot of your outputs. I just ran a test on my end and I didn't have an issue with the order by. 

     

    I'm assuming there might be an extra space or hidden character in your Id header. If you take a look at the outputs, please confirm the text for your Id column between the double quotes. For my demo, my text is ID.

     

    If you see an extra space in your text such as "Id ": or "Id  ": you would have to either a) remove the extra spaces in your header or b) adjust your Order By ODATA query to match the text exactly as it appears in red between the double quote marks.

    creativeopinion_1-1694105975201.png

     

    creativeopinion_0-1694105961336.png

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

  • Verified answer
    chsmebye Profile Picture
    13 on at

    Thanks for reply @creativeopinion !
    I have work with this and found out that i cant use formulas in the Id column. When I user "raw" numbers it worked!

    But!
    I think that when the flows triggers it opens the Excel file and do not find the latest result from the form. I tried this by send in a new Form and the flow gets the second newest row.
    Example:
    - sends in Form that gets Id 10
    - the flow gets Id 9
    Tried also with a delay so Im sure that the Form reply is in the Excel file, but no sigar.

    Thanks anyway! I need another approach.

  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @chsmebye Do you have another flow that is inserting data from the Form into your Excel table?... 

  • chsmebye Profile Picture
    13 on at

    @creativeopinion 
    No other flow, but formulas. Like VLOOKUP etc. and the cell with a VLOOKUP will not work with ORDERBY.
    The solution I ended up with was to just have a mapping table in excel and just make the object in the flow. 

    chsmebye_0-1694590642552.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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard