How to Apply Filter Between Dates in Power Automate?

Doesn’t know how to apply filter between dates in Power Automate? Then this Power Automate tutorial will help you to apply filters between dates using flow with different examples.

Moreover, we will also cover below points:

  • Odata filter query last 3 days
  • Odata filter query greater than or equal

In this tutorial, we will use the Products Orders SharePoint List consisting of Product ID, Product Name, Product Color, Quantity, Total Price, OrderedDate, Mode of Payment, Product Delivered status, Current date field, and Estimated Date field.

How to apply Filter Between Dates using Power Automate flow

Apply Filter Between Dates using Power Automate

Let us see how to filter the SharePoint list of items between dates using Power Automate flow.

Now we will create a flow to filter the values if the Ordered date is less than or equal to today’s date.

Initially, Log in to Power Automate and create an instant cloud flow to trigger manually.

Apply Filter Between Dates using Power Automate flow
  • We will use the get items action to apply the filter while receiving list items from SharePoint.
  • Select the +new step, add the Get items action, and configure the SharePoint site address and list name.
  • Expand Show advanced options to see the Filter Query Option. Apply the below query to get the items where the Ordered date is less than or equal to today’s date. (whereas today’s date is 03/07/2023).
  • Make sure the in-filter query you have passed the SharePoint list column’s internal name.
"OrderedDate le '@{utcNow('yyyy-MM-dd')}'"
Filter Between Dates using Power Automate
  • We will create an HTML table with custom headers and dynamic values, so click on the Next step and select Create Html table action.
  • In the From Field, select the value of get items from the dynamic content and map the field value to view filtered values from the SharePoint list.
Filter Between Dates using Power Automate flow

Now click on Save and run the flow manually by selecting the run flow option. Once the flow runs successfully like below:

Filter Between Dates using the Power Automate flow

We can see the filtered list item values in the output of Create HTML table action based on the condition applied.

apply Filter Between Dates using Microsoft flow

This is how to filter the SharePoint list of items between dates using Power Automate flow.

Odata filter query last 3 days in Power Automate

Here we will see how to apply a filter query to filter values for the last 3 days using Power Automate.

Here we will filter the values if the Ordered date is equal to less than 3 days from today and the current date is equal to today’s date. (whereas today’s date is 03/07/2023).

  • Create an instant cloud flow to trigger manually. Select the +new step, add the Get items action, and configure the SharePoint site address and list name.
  • Expand Show advanced options to see the Filter Query Option. Apply the below query under the expression tab to get the items where the Ordered date is equal to less than 3 days from today and the current date is equal to today’s date.
"OrderedDate eq '@{addDays(utcNow(),-3,'MM-dd-yyyy')}' and CurrentDate eq '@{utcNow('dd-MM-yyyy')}'"
Odata filter query last 3 days
  • Select Create Html table action with custom headers and dynamic values.
  • In the From Field, select the value of get items from the dynamic content and map the field value to view filtered values from the SharePoint list.
Odata filter query last 3 days using flow

Save and Test the flow manually by selecting the run flow option. Once the flow runs successfully like below:

Odata filter query last 3 days using Power Automate flow

We can see the filtered list item values in the outputs of Create HTML table action based on the condition applied.

Odata filter query last 3 days using the Power Automate flow

This is how to apply a filter query to filter values for the last 3 days using Power Automate.

Odata filter query greater than or equal in Power Automate

Let us see how to apply a filter query to filter values that are greater than or equal using Power Automate.

Now we will filter the values if the EstimatedDeliver is greater than today. (whereas today’s date is 03/07/2023).

  • Create an instant cloud flow to trigger manually. Select the +new step, add the Get items action, and configure the SharePoint site address and list name.
  • Expand Show advanced options to see the Filter Query Option. Apply the below query under the expression tab to get the items where the EstimatedDeliver is greater than today.
"EstimatedDelivery ge '@{formatDateTime(utcNow(),'MM-dd-yyyy')}'"
Odata filter query greater than or equal
  • Select Create Html table action with custom headers and dynamic values.
  • In the From Field, select the value of get items from the dynamic content and map the field value to view filtered values from the SharePoint list.
Odata filter query greater than or equal using flow

Save and Test the flow manually by selecting the run flow option. Once the flow runs successfully like below:

Odata filter query greater than or equal using Power Automate flow

We can see an expected result in the output of Create HTML table action based on the condition applied.

Odata filter query greater than or equal using the Power Automate flow

This is how to apply a filter query to filter values that are greater than or equal using Power Automate.

In this Microsoft Power Automate tutorial, we have learned how to apply filters between dates using Power Automate flow with different examples. We have also covered the below examples:

  • Odata filter query last 3 days
  • Odata filter query greater than or equal

You may also like:

>