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

Filter gallery by due date but cannot show the old items in the share point list

(1) ShareShare
ReportReport
Posted on by 31

Hello all,

 

I met the issue that my old data in Share Point List cannot show in the gallery when I filter gallery by date value.

 

My formula in Gallery and use Button to show my task name is as below

Gallery - Items = Filter('my share point list name', 'my due date column' = Thisitem.Value)

Button - Text = ThisItem.Task

 

It just only show the data for example,

If I create item today (ex. Jun 28th, 2024) , it can show in the gallery.

But other items before Jun 28th, 2024 cannot show. 

 

It is tricky that if I don't use filter, the gallery can show all share point list items.

 

P.S.I just follow this youtube to create the calendar apps... (the formula is in 17:03)

https://www.youtube.com/watch?v=NAEZ4m-EjDA


It's appreciated if anyone advise this situation.

 

Best Regards,

Mori Midori

 

Categories:
I have the same question (0)
  • Verified answer
    Sunil Kumar Pashikanti Profile Picture
    1,077 Moderator on at

    Hi @MoriMidori

     

    I understand the issue you’re facing with filtering old data in your PowerApps gallery based on a date column. Let’s address this step by step.

     

    Filtering Gallery by Date:
    When filtering a gallery by a date column, you need to ensure that the filter condition correctly captures the date range you want.
    In your case, you’re using the formula:

    Filter('my share point list name', 'my due date column' = ThisItem.Value)

    However, this formula only filters for items with the exact due date matching the current item’s value. It won’t include older items.


    Adjusting the Filter:
    To show items with due dates on or before today, modify your formula as follows:

    Filter('my share point list name', 'my due date column' <= Today())

    This will include all items with due dates up to and including today.


    Handling Old Items:
    If you want to show all items (including older ones) when no filter is applied, you can use a conditional approach:
    Create a variable (let’s call it ShowAllItems) that determines whether to apply the filter or not.
    Set ShowAllItems to true when no filter is needed (e.g., when the gallery loads).


    Modify your gallery formula:

    If(ShowAllItems, 'my share point list name', Filter('my share point list name', 'my due date column' <= Today()))

    When you want to show all items (without filtering), set ShowAllItems to true.


    Testing:
    Test your gallery with this adjusted formula. It should display all items when ShowAllItems is true and filter based on due dates otherwise.


    Remember to replace 'my share point list name' and 'my due date column' with the actual names from your SharePoint list.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Sunil Pashikanti - Tech Blog: PowerApps

     

     

     

     

     

     

  • MoriMidori Profile Picture
    31 on at

    @SunilPashikanti 

    thanks a lot!
    It is worked.

     

    Best Regards,

    Mori Midori

     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 538 Most Valuable Professional

#2
11manish Profile Picture

11manish 307

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard