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 / Filter gallery by last...
Power Apps
Answered

Filter gallery by last 15 entries

(0) ShareShare
ReportReport
Posted on by 407

I have a gallery with the datasource set to Sharepoint. I am also filtering by user and selected admin. This is the syntax i have in the Items, it works fine.

If(User().Email in varAdminEmail, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email))

I want to also show only the last 15 entries.  I have tried using LastN(KBXoffline, 15), which works when put in Items by itself, however i can not seem to be able to add it to the existing syntax.

If(User().Email in varAdminEmail, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email));
LastN(KBXoffline, 15)

 

Can anyone please assist,

 

KR's,

Matt383

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Matt383 

    Here’s the code you should add to filter on the 1st 15 entries.

    FirstN(Sort(If(User().Email in varAdminEmail, KBXoffline, Filter(KBXoffline, 'Created By'.Email = User().Email)), Created, Descending), 15)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Matt383 Profile Picture
    407 on at

    Thanks Mdevaney,

     

    Thats what i was looking for 

     

    Matt383

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 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard