Power Apps Filter Gallery By Date [With Examples]

This Microsoft Power Apps tutorial explains the Power Apps filter gallery by date.

Here, I will discuss how to filter the Power Apps gallery by Date picker control and how to filter the Power Apps gallery by date and time.

Moreover, we will see how we can filter the Power App gallery by date range and how to filter the Power Apps gallery by dropdown control.

Power Apps Filter Gallery By Date Picker

We will see how to work with the Power Apps filter gallery by Date Picker by taking a simple scenario.

Example:

  • I have a SharePoint Online list, i.e., [Order Details]. This list contains the fields below:
Column NameData Type
Product NameThis is a Title column with a single line of text. I just renamed it to Product Name
Order DateDate and time
PriceCurrency
Warranty YearsNumber
Power Apps Filter Gallery By Date
  • In Power Apps, there is a Date picker control and a Gallery control.
  • When a user selects a date from the date picker, the gallery will filter and display the records based on the selected date.
Power Apps Filter Gallery By Selected Date

To achieve the above example, follow the below-mentioned steps. Such as:

  • Open your Power Apps with respective Microsoft credentials -> Create a Power Apps blank canvas app -> Connect the SharePoint list to the app. Once you connect, it will look like the screenshot below.
Power Apps Filter Gallery By Date Picker
  • Insert a Power Apps Date picker control into the screen.
  • Also, add a Gallery control [gal_Products] -> Set its Items property as:
Items = Filter(
    'Order Details',
    'Order Date' = OrderDatePicker.SelectedDate
)

Where,

  1. ‘Order Details’ = SharePoint Online List
  2. ‘Order Date’ = SharePoint Date Field
  3. OrderDatePicker = Date Picker Name
Power Apps Gallery Filter By Date
  • Save, Publish, and Preview the app. Select a specific date from the date picker and then the gallery will filter and display the records based on the selected date.
Power Apps Gallery Filter By Date Picker

This is how to filter a Power Apps Gallery by Date picker control.

Power Apps Filter Gallery By Date Range

Next, we will see how to filter Power Apps gallery by date range.

Example:

I have created a SharePoint Online List [Travel Requests]. This list contains the fields below:

Column NameData Type
Trip titleThis is a Title column with a single line of text. I just renamed it to Trip title
AirlineChoice column
DestinationLocation column
Travel start dateDate and time column
Travel end dateDate and time column
Power Apps Filter Gallery By Date Range
  • In Power Apps, there are two Date pickers, i.e., [Travel Start Date] and [Travel End Date].
  • Also, there is a Power Apps Gallery control. When a user selects the start and end dates, the gallery will filter and display the records within the user-selected date range.
Power Apps Gallery Filter By Between Dates

To work around this example, follow the below steps.

  • On the Power Apps Screen -> Insert two Date pickers.
  • Add a Gallery control and set its Items property to the code below:
Items = Filter(
    'Travel Requests',
    'Travel start date' >= Start_DatePicker.SelectedDate,
    'Travel end date' <= End_DatePicker.SelectedDate
)

Where,

  1. ‘Travel Requests’ = SharePoint Online List
  2. ‘Travel start date’, ‘Travel end date’ = SharePoint Date Fields
  3. Start_DatePicker, End_DatePicker = Date Picker Names
Power Apps Gallery Filter By Date Range
  • Save, Publish, and Preview the app. Select a Travel start date and Travel end date. Then, the gallery will be filtered and display all the records between these date ranges.
Power Apps Filter Gallery By the Date Range

This is all about the Power Apps filter gallery by date range.

Power Apps Filter Gallery By Date and Time

Let’s discuss how to filter the Power Apps gallery by date and time.

Example:

I have a SharePoint Online List named “Orders List“. This list contains the fields below.

Refer to the below table:

Column NameData Type
Product NameThis is a Title column with a single line of text. I just renamed it to Product Name
Order DateDate and time [including time]
PriceCurrency
Power Apps Filter Gallery By Date and Time
  • In Power Apps, there is a Gallery control. If the Order Date is less than today, the gallery will filter and display all the less than today’s records, as shown below.
Power Apps Gallery Filter By Date and Time

To do so, follow the below steps. Such as:

  • On the Power Apps Screen, insert a Gallery control and set its Items property:
Items = Filter('Orders List',OrderDate<Today())

Where,

  1. ‘Orders List’ = SharePoint Online List
  2. OrderDate = SharePoint Date Field Column [including time]
  3. Today() = Power Apps Today() helps to get the current date
How to Filter a Power Apps Gallery By Date and Time
  • Save, Publish, and Preview the app. The gallery will display the filtered date records as in the screenshot below.
How to Filter Power Apps Gallery By Date and Time

This is how to filter a Power Apps gallery by date and time.

Power Apps Filter Gallery By Dropdown Date

We will see how to work with the Power Apps filter gallery by Dropdown Date by taking a simple scenario.

Example:

I have a SharePoint Online list, i.e., [Orders List]. This list contains different fields. Such as:

Column NameData Type
ItemThis is a Title column with a single line of text. I just renamed it to Item
CategoryChoice column
DateDate and time column
AmountCurrency column
Power Apps Filter Gallery By Dropdown Date
  • In Power Apps, there is a Dropdown control and a Gallery control.
  • When a user selects a particular date from the dropdown control, the gallery will filter and display the records based on the selected date.
Power Apps Filter Gallery By using Dropdown Date

To work around this example, follow the below steps. Such as:

  • On the Power Apps Screen, insert a Dropdown control and set its Items property as:
Items = Distinct('Expense Tracker',Date)

Where,

  1. Distinct() = This function helps us to find unique values and remove duplicate values from the data source
  2. ‘Expense Tracker’ = SharePoint Online List
  3. Date = SharePoint Date Field
Power Apps Gallery Filter By Dropdown Date
  • Then, insert a Gallery control and set its Items property as:
Items = Filter('Expense Tracker',Date=drp_Date.Selected.Value)

Where,

  1. drp_Date = Dropdown name
How to Filter Power Apps Gallery By Dropdown Date
  • Save, Publish, and Preview the app. Select any particular date from the dropdown control, and then the gallery will filter and display the records based on the dropdown-selected date.
How to a Filter Power Apps Gallery By Dropdown Date

This is all about the Power Apps filter gallery by dropdown date.

Conclusion

This Microsoft Power Apps tutorial taught us all about the Power Apps filter gallery by date. Here, I explained how to filter the Power Apps gallery by Date picker control and how to filter the Power Apps gallery by date and time.

In the last, we covered how to filter the Power App gallery by date range and the Power Apps gallery by dropdown date.

Furthermore, you may like some more Power Apps tutorials: