Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

MS Flow - Filter A list to Show only First Item


I would like to use a flow to populate a SharePoint list with only the latest record for each unique ID from another list.


List 1 (All Records)

Unique ID       Record Date   

1                     1/1/2010

1                     1/1/2015

2                     6/1/2011

2                     1/1/2010

3                     3/1/2011

3                     5/1/2010


Use MS FLow to Create a New Table with the most recent Record date for each Unique ID.  Example Output - List 2:

Unique ID       Record Date   

1                     1/1/2015

2                     6/1/2011

3                     3/1/2011


I understand how to access data from List 1, and how to write records.  My issue is figuring out how to only write the latest record to List 2

Super User
Super User

Re: MS Flow - Filter A list to Show only First Item

@Sticks1972 :


Here is an easy way to get the last list item.

  1. Configure a Get Items action to sort the list items by ID in a descending order
  2. Configure the Get items to return just 1 item

The screen shot below if for a Flow that runs successfully and returns just the last item in a list:



If this addresses your issue, please mark your post as Solved.



If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Level: Powered On

Re: MS Flow - Filter A list to Show only First Item


Your solution gives the last item in the list, but not the last item specific to each unique ID.  I'm essentially trying to create a loop to create a list that is Grouped by ID.

Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,811)