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 in the gallery ...
Power Apps
Unanswered

Filter in the gallery showing only 1 record per day

(0) ShareShare
ReportReport
Posted on by 361

I need to create a filter in the gallery that shows records made by date according to the name of the selected person. For example: I selected person X in the comboBox. If a record was made on 10/14/2023 for person My filter is respecting the formula for comboBox 3_4:

Filter(
DadosGerados;(Len(ComboBox3_4.Selected.Value) = 0 || 'Created by'.DisplayName = ComboBox3_4.Selected.Value))

 

Joaoandrebs_0-1698320274469.png

 

 

Joaoandrebs_1-1698320273772.png

 

 

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Joaoandrebs 

     

    Use the GroupBy function to group the records by date and then use the First function to get the first record of each group.

     

    Try this formula for the Items property of the gallery:

    GroupBy( 
     Filter( 
     DadosGerados, 
     ( 
     Len(ComboBox3_4.Selected.Value) = 0 || 
     'Created by'.DisplayName = ComboBox3_4.Selected.Value
     ) 
     ), 
     "Date", 
     "Records" 
    ).Records

    This will return a table with two columns: Date and Records. The Records column contains a nested table with all the records that have the same date. You can then use First(Records) to access the first record of each group.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Joaoandrebs Profile Picture
    361 on at

    Joaoandrebs_0-1698325729372.png

    @SpongYe I'm trying to do what was said, but I've never used the records function, how do I do it?

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Firstly can you make a screenshot for me what is stored in ThisItem?

    Secondly I want to know how the table looks like at your end with the given formula:

    GroupBy( 
     Filter( 
     DadosGerados, 
     ( 
     Len(ComboBox3_4.Selected.Value) = 0 || 
     'Created by'.DisplayName = ComboBox3_4.Selected.Value
     ) 
     ), 
     "Date", 
     "Records" 
    )

     

     

  • Joaoandrebs Profile Picture
    361 on at

    @SpongYe records was returned Table...

     

    I switch your "Date" (was showing error) for "Horario"...

    Joaoandrebs_0-1698327406522.png

     

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    > I'm trying to do what was said, but I've never used the records function, how do I do it?

    Records is not a function but the name of the column in the groupby. 

    I cannot reproduce your use case because it is so specific, but I can solve it with you.

     

    In your post where you used First() what was the error message you received? 

     

    Can you look inside the Table of one row in Records and see what columns are visible there? 

    Put in inside a variable through a button OnSelect:

    Set(testRecord, First(ThisItem.Records)) //replace ThisItem with the datasource if necessary

    Share a screenshot with me. 

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

  • Joaoandrebs Profile Picture
    361 on at

    @SpongYe 

    Joaoandrebs_0-1698332263876.png

     

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Joaoandrebs 

     

    I have seen enough let try something else:

    Filter(
     FirstN(
     GroupBy(
     DadosGerados, 
     Date, 
     'Created by'.DisplayName, "Grouped"
     ), 
     1 ), 
    'Created by'.DisplayName = ComboBox3_4.Selected.Value
    )
    

    This will show only the records that match the selected person’s name. You can also sort the records by date using the Sort or SortByColumns functions. 

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Joaoandrebs Profile Picture
    361 on at

    @SpongYe Groupby have invalid arguments 

    Joaoandrebs_0-1698414085123.png

     

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard