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 / How to retrieve items,...
Power Apps
Answered

How to retrieve items, depend on latest date?

(0) ShareShare
ReportReport
Posted on by 255

Hello, 

I have SP list with items, which represent covid test employee.
Example: 
employee A - 20.3.2021
employee B - 28.3.2021
employee A - 17.03.2021

And I make app, where I need to retrieve only the latest test of employee. 
Result should be:
employee A - 20.3.2021
employee B - 28.3.2021

But, I dont know, how to filter it. Or if use power automate/ logic apps to get required items?
Is in power apps some function for it, or another way to get it?

Thanks for any advice. 


Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @TomasG 

    All SharePoint lists have a hidden ID column that is sequential.  To see the latest items, you can do this as the Items property of a gallery or datatable.  This function is delegatable, meaning it will work no matter how many items are in your list. 

     

    Sort(Yourlist,ID,Descending)

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Power-Apps-Select-Max-Row-for-Each-Group/m-p/762170

     

    here is a forum post describing something similar I used to find the most recent record.

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @TomasG,

    Based on the issue that you mentioned, do you want to filter out the latest test for each employee?

    Could you please share a bit more about the scenario,is this date a Date and Time column?

    I think GroupBy() function could achieve your needs.

    I just assume that you have a Date and Time column.

    Where do you want to filter out the records, Gallery?

    Add a Gallery and set the Items:

    GroupBy(SPLits,"employee","Gemp")

    Set the Text of the Label within as below:

    First(Sort(ThisItem.Gemp,Date,Descending)).Date

    v-qiaqi-msft_0-1617959630838.png

    Regards,

    Qi

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard