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 / [Question] Lookup last...
Power Apps
Answered

[Question] Lookup last row

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello wonderful community,

 

I have a question concerning how to lookup the last row in a table when I don't know how many rows.

 

For example, I have the table below, with columns: ID, Ticket ID, First Name, Last Name, Company

 

  • Row 1 - JU192 - James - Antwan - Trans. INC
  • Row 2 - JU193 - Jack - Belford - XYZ INC
  • Row 3 - JU192 - Anthon - Jacks - Unierst INC
  • Row 4 - JU192 - Jimmy - McField - Standom INC
  • Row 5 - JU194 - Neo - McField - FieldMax INC

How can I look up the column Ticket ID = JU192 column Company, and to give me the last results which is Standom INC

 

Thanks 🙂

Categories:
  • Mike8 Profile Picture
    1,330 on at

    Hello,

    I think you can't. 😛

  • Verified answer
    Shanescows Profile Picture
    2,218 Most Valuable Professional on at

    Thinking off the top of my head but I think you can.

     

    Combine the Filter and Last functions. 

     

    Last(Filter(DataSource, Column = Value, ColumnYouWantToReturn).ColumnYouWantToReturn

     

    In my head that is real close if not exactly what you need @Anonymous

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Shanescows is correct and I believe that would also be delegable in all of the following, one of which you are likely using

     

    • Common Data Service
    • SharePoint 
    • SQL Server 
    • Dynamics 365 
    • Salesforce

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Pretty amazing 🙂 Thank you @Shanescows

     

    And thank you guys for the support.

     

    And @Mike8 😛

  • Mike8 Profile Picture
    1,330 on at

    Hehe. I am sorry. I misunderstood the question.
    I am glad that Shanescows got it right.

    You are welcome 😛

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hi @Shanescows 

     

    tried this formula pulling up data from Sharepoint List but it returns no data found. 

     
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Shanescows 

     

    I used this but it gave me 0 result where it should be 54: Max(LookUp(Attendance_Tracker_15,Title = "ASP10986",UniqueID0))

  • Tangi12 Profile Picture
    32 on at

    @Shanescows I am trying to do this same thing, but utilizing the Created By field. (love your videos by the way) 🙂

     

    I can't seem to get it to work.

    Last(Filter('Model Branch Check In/Check Out',ThisItem.Title='Model Name','Created By'.DisplayName).'Created By')

     

    At the end, I have tried 'Created By'.DisplayName and 'Created By'

     

    Thanks for any help!!!!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Tangi12 

     

    I think first, you would need to write the Filter function properly:

     

    Filter('Model Branch Check In/Check Out',Title='Model Name','Created By'.DisplayName = "John Smith")

     

     

    Then add the Last function on it:

     

    Last(Filter('Model Branch Check In/Check Out',Title='Model Name','Created By'.DisplayName = "John Smith")).'Created By'.DisplayName

     

  • kkmavro Profile Picture
    7 on at

    I've tried ClearCollect into Sample and then Last on the containts of Sample. And worked... I wanted to show a popup screen with the last record after submiting a new form (let's say order No)

     

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard