In one of my recent Power Apps projects, I needed to filter the gallery by the current day and the Next N number of days. I achieved this using the Power Apps Today() function.
In this article, I will explain how to filter Power Apps gallery by days, such as filtering by the current day, next day, next N days, etc.
Also, we will discuss how to filter the Power Apps gallery by previous days and previous N days with various examples.
Filter Power Apps Gallery By Days [Current Day]
Let’s discuss how we’ll filter the Power Apps gallery by the current day or today.
Example:
- I have a SharePoint List named Order Details. This list contains the below fields.
| Column Name | Data Type |
| Product Name | This is a Title column with a single line of text. I just renamed it to Product Name |
| Order Date | Date and Time |
| Price | Number |

- In Power Apps, there is a Gallery control. This gallery displays each record from the SharePoint list based on today’s records, as in the screenshot below.

To achieve the above example, follow the below-mentioned steps. Such as:
- Insert a Gallery control [gal_ProductOrders] and set its Items property as:
Items = With(
{
StartDate: Today(),
EndDate: Today() + 1
},
Filter(
'Order Details',
'Order Date' >= StartDate,
'Order Date' < EndDate
)
)Where,
- With() = This function can help us to evaluate a formula for a single record
- StartDate, EndDate = Power Apps scope variables
- Today() = Power Apps Today() helps to get the current date
- ‘Order Details’ = SharePoint Online List
- ‘Order Date’ = SharePoint date field

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Today’s Records], as in the screenshot below.

This is how to filter a Power Apps gallery by Today’s Date.
Power Apps Filter Gallery By Next Day [Tomorrow]
Next, we will see how to filter a Power Apps gallery by the next day.
Example:
- I will also take the same SharePoint Online list [Order Details] for this example. In Power Apps, there is a Vertical Gallery control. This gallery filters and displays each record from the SharePoint list based on the next or tomorrow’s date.
Refer to the below image:

To work around this example, follow the below steps.
- On the Power Apps Screen -> Insert a Gallery control and set its Items property to the code below.
Items = With(
{
StartDate: Today(),
EndDate: Today() + 1
},
Filter(
'Order Details',
'Order Date' > StartDate,
'Order Date' <= EndDate
)
)Where,
- StartDate, EndDate = Power Apps Scope Variables
- Today() + 1 = Tomorrow’s Date

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Tomorrow’s Records], as in the screenshot below.

This is how to filter the Power Apps gallery by Tomorrow’s date.
Power Apps Filter Gallery By Next N Days
Let’s discuss how to filter the Power Apps gallery by the next ‘N’ Days.
Example:
- I will take the same above SharePoint list [Order Details] for this example. In Power Apps, there is a Vertical Gallery control. This gallery filters and displays each record from the SharePoint list based on the next/upcoming three days.
Refer to the below screenshot:

To do so, follow the below steps.
- On the Power Apps Screen -> Insert a Gallery control and set its Items property as:
Items = With(
{
StartDate: Today(),
EndDate: Today() + 3 // You can change this number of days
},
Filter(
colOrders,
'Order Date' >= StartDate,
'Order Date' <= EndDate
)
)Where,
- Today() + 3 = Today() function helps to get the current date. And 3 is the number of weekdays.

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Next three Day’s Records] as shown below.

This is all about the Power Apps filter gallery by the next ‘N’ Days.
Power Apps Filter Gallery By Yesterday [Previous Day]
Here, we will see how to filter a Power Apps gallery by Yesterday’s Date by taking a simple scenario.
Example:
- I will take the same above SharePoint list [Order Details] for this example. In Power Apps, there is a Vertical Gallery control. This gallery displays each record from the SharePoint list based on the yesterday or previous day.
Refer to the below image:

To work around this example, follow the below-mentioned steps.
- Open the Power Apps Screen -> Insert a Gallery control and set its Items property as:
Items = With(
{
StartDate: Today()-1,
EndDate: Today()
},
Filter(
'Order Details',
'Order Date' >= StartDate,
'Order Date' < EndDate
)
)Where,
- Today()-1 = Yesterday’s Date

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Yesterday’s Records] as in the screenshot below.

This is how to filter a Power Apps gallery by Yesterday’s Date.
Power Apps Filter Gallery By Previous ‘N’ Days
Finally, we will discuss filtering a Power Apps gallery by Previous N Days.
Example:
- I will also take the same SharePoint list [Orders Details] for this example. In Power Apps, there is a Gallery control. This gallery displays each record from the SharePoint list based on the last/previous four days.
Refer to the below screenshot:

To achieve this, follow the below steps.
- On the Power Apps Screen -> Insert a Gallery control and set its Items property to the code below.
Items = Filter(
'Order Details',
'Order Date' >= DateAdd(
Today(),
-4, // You can also change the number of days
TimeUnit.Days
)
)Where,
- ‘Order Details’ = SharePoint Online List
- DateAdd() = This function adds a number of units to a Date/Time column
- -4 = Number of Previous Days

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Previous four Day’s Records] as shown below.

This is how to filter a Power Apps gallery by Previous ‘N’ Days.
Conclusion
This Microsoft Power Apps tutorial taught us all about the Power Apps filter gallery by day. Here, I explained how to filter the Power Apps gallery by the current day and how to filter the Power Apps gallery by the next day.
Also, we discussed the Power Apps filter gallery by the next ‘N’ days and how to filter a Power Apps gallery by the previous day. We last covered how to filter the Power Apps gallery by the previous ‘N’ days.
Also, you may like some more Power Apps tutorials:
- Filter Power Apps Gallery By Week
- Submit Data From Power Apps to Excel
- Power Apps Collection Contains
- Create a Power Apps Collection On OnStart Property
- Power Apps Filter Gallery By Date
- Power Apps Filter Gallery By Year

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.