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