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 / finds the LAST 4 recor...
Power Apps
Answered

finds the LAST 4 records in the different gallery list

(0) ShareShare
ReportReport
Posted on by 361

I have a gallery of a random list to display this data, and another list where the item in common between the two is ThisItem.'Estacao com APA' and Estacao. I did a lookUp to pull the data from the Week column, but the lookUp found only one record.

Joaoandrebs_0-1688949823958.png

 

What I need is: a formula that always finds the LAST 4 records of the "Week" column of the DataGeradosIPG List, and displays it in the label. (remembering that the list is not the same as the Item property of the gallery, so I tried lookUP) Thank you!

Categories:
I have the same question (0)
  • Verified answer
    madlad Profile Picture
    2,637 Moderator on at

    I think you want to use the Sort function, if you need to sort by the weeks column, the LastN function to get the last 4 records, and the Concat function to display them all in one label.

    I'm not 100% sure exactly how your list is set up, but it looks like you might want to use something along the lines of:

     

    Concat(LastN(Sort(DataGeradosIPG;"Week"); 4); Week)

     

    I haven't been able to test this so it may need a bit of modification, but this should be the gist of what you need.

     

    Hope this helps!

  • CK6218 Profile Picture
    35 on at

    Concat(LastN(DataGeradosIPG, 4), 'Week', Char(10))

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard