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 / Keep row with highest ...
Power Automate
Unanswered

Keep row with highest value

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I'm trying to create a flow but I'm stuck at the moment. Hope someone can help me with this problem.


Here is what my share point list look like

 
Part QtyDate
A1

1/1

A21/1
A31/1
B21/1
B31/1
 

I need to keep the highest quantity for that part on a specific day. 
At the moment, I can only filter the date and send email. 

Thanks for reading.

 
Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @baotran9103 

     

    You can use odata filtering for that. 

     

    ffr.PNG

     

    Here, ffe is a number type column in my list and in the order by option i have addedd ffe desc to order the item in descending order based on ffe. and then change the top count to 1 such that it returns only one item that is the having the highest number. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • v-litu-msft Profile Picture
    on at

    Hi @baotran9103,

     

    @yashag2255 is correct, there is an Order By field in Get items action that could sort items in SharePoint by the quantity if the quantity is integer format.

     

    And the Filter query on a specific day could also do in the Get items action. Then you will get an array of items, the first member is the item with the highest quantity, you could use the index (0) of array member to get it:

    Annotation 2020-04-13 164948.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • baotran9103 Profile Picture
    5 on at

    Hi @YA@v-litu-msft 
    Thanks for you response. 
    I understand the filter. 

    However, I need filter for many part items with highest number, not just highest on the list

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @baotran9103 

     

    You can use multiple filter queries to filter the data and then use the filter query in sort by to get the highest number on a particular range or set of data from the SP list. 

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • takolota1 Profile Picture
    4,974 Moderator on at

    This template gives the largest / most recent or the smallest / oldest records for unique values in given columns. Kind of a Group By, then Max or Min.

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Get-Distinct-Records/td-p/2191533

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