This Microsoft Power Apps tutorial explains everything about the Power Apps filter gallery by Month.
Here, I will discuss how to filter a Power Apps gallery by the current month and how to filter a Power Apps gallery by next month.
Moreover, we will see the topics below:
- Filter Power Apps gallery by next ‘N’ months
- Filter Power Apps gallery by Previous month
- How to filter a Power Apps gallery by previous ‘N’ months
Power Apps Filter Gallery By Month [Current Month]
I will show you how to filter a Power Apps gallery by the current month.
Example:
- I have a SharePoint Online List named “Training Courses Demos“. This list contains the below fields.
Column Name | Data Type |
Course Name | This is a Title column with a single line of text. I just renamed it to “Course Name” |
Description | Multiple lines of text |
Demo Start Date | Date and time |
Demo End Date | Date and time |

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

To achieve the above example, follow the below steps. Such as:
- Open Power Apps -> Create a Power Apps canvas app -> Connect the SharePoint list, i.e., [Training Courses Demos] to the app. Once you connect, it will look like the screenshot below.

- Insert a Gallery control [gal_CurrentMonthDemos] and set its Items property to the code below.
Items = With(
{
StartDate: Date(
Year(Today()),
Month(Today()),
1
),
EndDate: Date(
Year(Today()),
Month(Today())+1,
1
)-1
},
Filter(
'Training Courses Demos',
'Demo Start Date' >= StartDate,
'Demo End 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
- Year(Today()) = This function returns the year component of a Date/Time value
- Month(Today()) = This function returns the month component of a Date/Time value
- ‘Training Courses Demos’ = SharePoint Online List
- ‘Demo Start Date’, ‘Demo End Date’ = SharePoint date fields columns

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

This is how to filter a Power Apps gallery by the current month.
Power Apps Filter Gallery By Next Month
Next, we will see how to filter a Power Apps gallery by next month.
Example:
- I will also take the same SharePoint Online list [Training Courses Demos] 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 month.
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 as:
Items = With(
{
StartDate: Date(
Year(Today()),
Month(Today())+1,
1
),
EndDate: Date(
Year(Today()),
Month(Today())+2,
1
)-1
},
Filter(
'Training Courses Demos',
'Demo Start Date' >= StartDate,
'Demo End Date' <= EndDate
)
)
Where,
- Month(Today())+1 = Power Apps Month() helps to get the current month, and “+1” is for next month

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

This is how we can filter a Power Apps gallery by the next/upcoming month.
Power Apps Filter Gallery By Next ‘N’ Months
Let’s see how to filter a Power Apps gallery by the next ‘N’ months.
Example:
- I will take the same SharePoint Online list [Training Courses Demos] 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 two months.

To do so, follow the below-mentioned steps. Such as:
- On the Power Apps Screen -> Insert a Gallery control and set its Items property to the code below.
Items = With(
{
StartDate: Date(
Year(Today()),
Month(Today()),
Day(Today())
),
EndDate: Date(
Year(Today()),
Month(Today())+2,
Day(Today())
)-1
},
Filter(
'Training Courses Demos' ,
'Demo Start Date' >= StartDate,
'Demo End Date' <= EndDate
)
)
Where,
- Month(Today())+2 = This function returns the month component of a Date/Time value, and ‘2’ is the number of next months // You can change the number of months
Refer to the below screenshot:

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Next 2 Months Records] like below.

This is all about the Power Apps filter gallery by the next/upcoming ‘N’ months.
Power Apps Filter Gallery By Previous Month
Similarly, here we will discuss how to filter a Power Apps gallery by the previous month.
Example:
- I will take the same SharePoint Online list [Training Courses Demos] for this example.
- In Power Apps, there is a Horizontal gallery control. This gallery displays each record from the SharePoint list based on the last or previous month.

To achieve this example, follow the below steps.
- On the Power Apps Screen -> Insert a Gallery control and set its Items property as:
Items = With(
{
StartDate: Date(
Year(Today()),
Month(Today())-1
,1
),
EndDate: Date(
Year(Today()),
Month(Today())
,1
)-1
},
Filter(
'Training Courses Demos' ,
'Demo Start Date' >= StartDate,
'Demo End Date' <= EndDate
)
)
Where,
- Month(Today())-1 = This function returns the month component of a Date/Time value, and ‘1’ is used for the previous/last month

- Save, Publish, and Preview the app. This gallery will display the filtered records, i.e., [Last 2 Months Records], as in the screenshot below.

This is how to filter a Power Apps gallery by previous/last month.
Power Apps Filter Gallery By Previous ‘N’ Months
Last, we will see how to filter a Power Apps gallery by previous ‘N’ months.
Example:
- I will also take the same SharePoint Online list [Training Courses Demos] for this example.
- In Power Apps, there is Vertical gallery control. This gallery displays each record from the SharePoint list based on the last or previous three months.
Refer to the below image:

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 = ith(
{
StartDate: Date(
Year(Today()),
Month(Today())-3,
Day(Today())
)+1,
EndDate: Date(
Year(Today()),
Month(Today()),
Day(Today())
)
},
Filter(
'Training Courses Demos' ,
'Demo Start Date' >= StartDate,
'Demo End Date' <= EndDate
)
)
Where,
- Month(Today())-3 = This function returns the month component of a Date/Time value, and ‘3’ is the number of previous months // You can change the number of months

- Save, Publish, and Preview the app. This gallery will display the filtered records, i.e., [Last 3 Months Records], as shown below.

This is how to filter a Power Apps gallery by previous/last ‘N’ months.
Conclusion
This Microsoft Power Apps tutorial taught us all about the Power Apps filter gallery by month.
Here, I explained how to filter a Power Apps gallery by the current month and how to filter a Power Apps gallery by next month.
Also, we discussed the Power Apps filter galley by the next/upcoming ‘N’ months and how to filter a Power Apps gallery by the previous month. Last, we covered how to filter a Power Apps gallery by previous/last ‘N’ months.
Additionally, you may like some more Power Apps tutorials:
- Power Apps Filter Gallery By Quarter
- Power Apps Filter Gallery By Year [Current, Next, Next N, Previous, Previous N]
- Power Apps Filter Gallery By Days
- Power Apps Filter Gallery By Week
- Power Apps Filter Gallery By Date
- Filter Power Apps Gallery By Multiple Dropdowns

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.