Skip to main content

Notifications

Power Apps - Building 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!

  • CK6218 Profile Picture
    CK6218 35 on at
    Re: finds the LAST 4 records in the different gallery list

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

  • Verified answer
    madlad Profile Picture
    madlad 2,637 on at
    Re: finds the LAST 4 records in the different gallery list

    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!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard