Do you know how to filter a Power Apps gallery by week? No worries!
This Power Apps tutorial explains everything about the Power Apps filter gallery by week like:
- How to filter Power Apps gallery by current week
- Filter Power Apps gallery by next week
- Working with Power Apps filter gallery by next ‘N’ weeks
- How to filter Power Apps gallery by last week
- Power Apps filter gallery by previous ‘N’ weeks
Power Apps Filter Gallery By Week [Current Week]
Here, I will show you how to filter a Power Apps gallery by the current week.
Example:
- I have a SharePoint Online List named “Expense Tracker“. This list contains the below fields.
Column Name | Data Type |
Item | This is a Title column with a single line of text. I just renamed it to “Item” |
Category | Choice |
Payment Date | Date and time |
Amount | Number |

- In Power Apps, there is a Gallery control. This gallery displays each record from the SharePoint list based on the current week.

To achieve the above example, follow the below-mentioned steps. Such as:
- Open Power Apps -> Create Power Apps blank canvas app -> Connect the SharePoint list to the app. Once you connect, it will look like the screenshot below.

- Insert a Gallery control [gal_CurrentWeekExpenses] and set its Items property as:
Items = With(
{
StartDate: Today() - (Weekday(
Today(),
StartOfWeek.Sunday
)) + 1,
EndDate: DateAdd(
Today(),
(7 - Weekday(
Today(),
StartOfWeek.Sunday
)),
TimeUnit.Days
)
},
Filter(
'Expense Tracker',
'Payment Date' >= StartDate,
'Payment Date' <= EndDate
)
)
Where,
- StartDate, EndDate = Power Apps Scope Variables
- Today() = Power Apps Today() helps to get the current date
- ‘Expense Tracker’ = SharePoint Online List
- ‘Payment Date’ = SharePoint Date Field

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

This is how to filter a Power Apps gallery by the current week.
Power Apps Filter Gallery By Next Week
Next, we will see how to filter a Power Apps gallery by next week.
Example:
- I will also take the same SharePoint Online list [Expense Tracker] for this example.
- In Power Apps, there is a Horizontal Gallery control. This gallery displays each record from the SharePoint list based on the next or upcoming week.

To work around this example, follow the below steps. Such as:
- On the Power Apps Screen -> Insert a Gallery control and set its Items property as:
Items = With(
{
StartDate: Today() - (Weekday(
Today(),
StartOfWeek.Sunday
)) + 7,
EndDate: DateAdd(
Today(),
(7 - Weekday(
Today(),
StartOfWeek.Sunday
))+7,
TimeUnit.Days
)
},
Filter(
'Expense Tracker',
'Payment Date' > StartDate,
'Payment Date' <= EndDate
)
)
Where,
- Today() = Power Apps Today() helps to get the current date
- Weekday() = This function returns a number representing the day of the week depending on the start date of the week
- StartOfWeek.Sunday = Start date of the week
- 7 = It is the number of days in a week
- TimeUnit.Days = This time units can evaluate the number of days in a week
Refer to the image below:

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Next Week’s Recors] like below.

This is how to filter a Power Apps gallery by the next week.
Power Apps Filter Gallery By Next ‘N’ Weeks
Let’s see how to filter the Power Apps gallery by the next ‘N’ weeks.
Example:
- I will take the same SharePoint Online list [Expense Tracker] 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 four weeks.

To do so, follow the below-mentioned 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() + (7*4) // You can also change the number of weeks
},
Filter(
'Expense Tracker',
'Payment Date' >= StartDate,
'Payment Date' <= EndDate
)
)
Where,
- Today() + (7*4) = Today() function helps to get the current date. And, 7 is the number of weekdays, and 4 means the next number of weeks.
Refer to the below screenshot:

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

This is all about the Power Apps filter gallery by the next ‘N’ weeks.
Power Apps Filter Gallery By Previous Week
Similarly, here we will see how to filter a Power Apps gallery by the previous week.
Example:
- I will take the same above SharePoint Online list [Expense Tracker] for this example.
- In Power Apps, there is a Vertical Gallery control. This gallery displays each record from the SharePoint list based on the last or previous week.

To achieve the above example, follow the below steps. Such as:
- On the Power Apps Screen -> Insert a Gallery control and set its Items property as:
Items = With(
{
StartDate: Today()-(Weekday(Today(), StartOfWeek.Sunday))-7,
EndDate: DateAdd(Today(),(7-Weekday(Today(), StartOfWeek.Sunday))-7,TimeUnit.Days)
},
Filter(
'Expense Tracker',
'Payment Date' > StartDate,
'Payment Date' <= EndDate
)
)
Where,
- Today(), StartOfWeek.Sunday))-7 = Today () function helps to get the current date. And, -7 is for the last week
Refer to the below image:

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

This is how to filter a Power Apps gallery by the previous week.
Power Apps Filter Gallery By Previous ‘N’ Weeks
Finally, I will show you how to filter a Power Apps gallery by previous ‘N’ weeks.
Example:
- I will also take the same SharePoint Online list [Expense Tracker] 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 two weeks.

To work around this example, follow the below steps.
- On the Power Apps Screen -> Insert a Gallery control and set its Items property code like below.
Items = With(
{
StartDate: Today()- (7*2), // You can also change the number of weeks
EndDate: Today()
},
Filter(
'Expense Tracker',
'Payment Date' > StartDate,
'Payment Date' <= EndDate
)
)
Where,
- Today()- (7*2) = Today () function helps to get the current date. And, 7 is the number of weekdays and 2 means the last number of weeks.

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Last Two Week’s Records] like below.

This is how to filter a Power Apps gallery by the last ‘N’ weeks.
Conclusion
I have explained in detail the Power Apps filter gallery by week.
I have also discussed the Power Apps filter gallery by the current week and how to filter a Power Apps gallery by the last week.
In the last, I have covered the Power Apps gallery by the next ‘N’ weeks and how to filter a Power Apps gallery by the previous ‘N’ weeks.
Additionally, you may like some more Power Apps tutorials:
- Power Apps Filter Gallery By Date
- Power Apps Filter Gallery By Year
- Filter Power Apps Gallery by Person
- Power Apps Filter Gallery By Quarter [With Examples]
- How to Bind Dropdown Items from Power Apps Collection
- How to Use App OnStart Function in Power Apps?

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.