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 crea...
Power Apps
Answered

Filter Gallery by created time most recent only

(0) ShareShare
ReportReport
Posted on by 11

I am trying to make a Gallery that only displays the most recent entries for a dataset.

The project is recording for the same "Zone" multiple times a day, and documenting Pass / Fail for that zone.

I have multiple zones to track and I want the gallery to only show me the most recent record for each unique zone.

I have the fill filters set (If done withing 6 hours green, if with in 12 red, else white) I want to see if they missed a zone which is why I want only the most recent entry per zone)

 

Basically

Sort by zone, pull only most recent created records.

I have most everything else figures out on this but am having issues with the making it only show the most recent entries.

Categories:
  • Sienna Profile Picture
    1,532 on at

    I'm not sure if I undesrstand your question correctly. If you want to filter most recent datasource entry and you have column which record the timestamp when the record was created then use this

     

    Filter(DatasourceName, TimeColumnName>DateAdd(Now(),-12, Hours))

     

    This will filter your datasource with date created in last 12 hours.

    Is this what you want?

  • DuncanKlysh Profile Picture
    11 on at

    That helps with another problem I was having, let me try and explain better

     

    I have this data set

     

    ZoneTime
    A1/29/2018
    B1/29/2018
    C1/29/2018
    D1/29/2018
    A2/2/2018
    B2/2/2018
    C2/2/2018
    A2/3/2018
    B2/3/2018

     

    From that I only want to see this

    ZoneTime
    D1/29/2018
    C2/2/2018
    A2/3/2018
    B2/3/2018

     

    Chronologically the last occurance of the station.

    If need I can do with out the Gallery it's self, I just need this data to appear this way.

  • Verified answer
    Sienna Profile Picture
    1,532 on at

    I got it now... I believe you need something like this

     

    Sort(AddColumns(
    GroupBy(Table1, "Zone", "TimeColumn"),
    "MaxVal",Max(TimeColumn,TimeColumn)),
    MaxVal,Ascending)
  • DuncanKlysh Profile Picture
    11 on at

    Thanks that fixed part of the problem, trying to now merge that with another formula.

     

    Sort(AddColumns(

    GroupBy(Table1, "Zone", "Created"),

    "MaxVal",Max(Created,Created)),

    MaxVal,Ascending)

     

    and

     

    SortByColumns(Filter('Table1', Location = DashDropdown.Selected.Value),"Area",Descending)

     

    Your formula provides what I need for the most recent of each Zone, I have the existing filter for Location which filters from a dropdown.

    Can these be merged?

  • Sienna Profile Picture
    1,532 on at

    Hi @DuncanKlysh

    try this

     

    SortByColumns(

    Sort(AddColumns(

    GroupBy(Filter('Table1', Location = DashDropdown.Selected.Value), "Zone", "Created"),

    "MaxVal",Max(Created,Created)),

    MaxVal,Ascending),

    "Area", Descending)

     

    I'm not sure if this will work.. you just have to play with it to get required result

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard