Power Automate Filter Query Operators [With Examples]

In this Power Automate tutorial, we will learn what Filter Query is and how to use the Filter Query operators in Power Automate flow with different examples.

What is Filter Query in Power Automate?

Power Automate filter query retrieves items from the SharePoint Online list and also from other data sources. And also it filters and displays that data based on the condition applied.

The Syntax of the Filter Query is:

  1. Field or Column Name
  2. Operator
  3. Field value you want to check/filter

In the below table we can see the Operators are listed along with a description:

Operators Description
eqEqual to
neNot equal to
gtGreater than
ltLess than
geGreater than or equal to
leLess than or equal to
containscontains (Not Supported in Get items filter query)
not containsDoes not contains (Not Supported in Get items filter query)
andAnd
orOr
StartswithStart with the specified value
EndswithEnd with the specified value (Not Supported in Get items filter query)
substring Ofreturn string characters
Power Automate Filter Query Operators

In this Complete tutorial, we will be using the below SharePoint List called Products List Consisting of Product Code no, Product Name, Customer Name, Customer Location, Unit Price, Quantity, OrderDate, order priority, and Market Price.

Power Automate filter query equal to operator

In the following, we will see how we can use these operators and filter values using Power Automate flow:

Let us explore various Filter Query Operators in Power Automate.

Power Automate filter query equal to operator

Let us see how to apply a filter query using the equal-to operator in Power Automate.

In this example, we will filter data value where the Product Name is equal to using “eq” i.e. Equal to operator to filter the data.

Now we will create a flow to apply a filter query dynamically based on the Product Name. It filters and displays the data based on Product Name.

  • Log in to the Power Automate flow -> Select instant cloud flow -> Enter Flow Name -> Choose Manually trigger a flow option -> Click on the create button like below.
Power Automate Filter Query Operators
  • Expand the trigger action and Add a text input value for the Product Name.
filter query equal to operator using the Power Automate flow
  • Select the Get Items action, to get list items from the SharePoint list and also to apply a filter in the filter query.
  • Configure the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and values to filter.
"ProductName eq '@{triggerBody()['text']}'"

Where,

  • ProductName = Column internal Name
  • eq = Operator
  • {triggerBody()[‘text’]} = Dynamic content value
Power Automate filter query equal to operator example

To see the result, we will create an HTML table and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair.

filter query equal to operator using Power Automate flow

Save and Test the flow. Now Enter the Product Name to filter the values and click on the Run flow Option.

Odata filter query equal to operator using microsoft flow

Once the flow ran successfully, we can see in the HTML table Output section we can view the filtered items based on the Product Name.

Odata filter query equal to operator using the Power Automate flow

In the same way, we will filter different products we can enter the product name and choose the run flow option.

Odata filter query equal to operator using the microsoft flow

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the items based on the Product Name.

Odata filter query equal to operator using Power Automate flow

This is how to apply a filter query using the equal to operator in Power Automate flow.

Power Automate filter query Not equal to operator

Here we will see how to filter data using a filter query Not equal to operator in Power Automate flow.

In this example, we will filter data value where the Product Name is not equal using “ne” i.e. Not Equal comparison operator to filter the data.

  • Create an instant cloud flow, Expand the trigger action, and Add a text input value for the Product Name.
  • Select the Get Items action, to get list items from the SharePoint list and also to apply a filter in the filter query.
  • Provide the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and values to filter.
"ProductName ne '@{triggerBody()['text']}'"

Where,

  • ProductName = Column internal Name
  • ne = Operator
  • {triggerBody()[‘text’]} = Dynamic content value
Power Automate filter query Not equal to operator

To see the result, we will create an HTML table and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair.

Example of filter query Not equal to operator in Power Automate

Save and Test the flow. Now Enter the Product Name to filter the values and click on the Run flow Option.

Example of filter query Not equal to operator in Power Automate flow

Once the flow ran successfully, we can see in the HTML table Output section we can view the filtered data except the Product name called Speaker.

Example of filter query Not equal to operator using Power Automate flow

This is how to filter data using a filter query Not equal to operator in Power Automate flow.

Power Automate filter query Greater than operator

Let us see how to apply a filter query using the Greater than operator in Power Automate flow.

In this example, we will filter data value where the Quantity is Greater than to using “gt” i.e. Greater than operator to filter the data.

  • Create an instant cloud flow, Expand the trigger action, and Add a Number input value for the Product Quantity.
Power Automate filter query Greater than operator
  • Select the Get Items action, to get list items from the SharePoint list and also to apply a filter in the filter query.
  • Configure the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and enter the number value to filter.
 "Quantity gt '@{triggerBody()['number']}'"

Where,

  • Quantity = Column internal Name
  • gt= Operator
  • {triggerBody()[‘number’]} = Dynamic content value
filter query Greater than operator in Power Automate

We will create an HTML table and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair to see the Output.

Example to filter query greater than operator in Power Automate

Save and Test the flow. Now Enter the Quantity Number to filter the values and click on the Run flow Option.

filter query greater than operator using microsoft flow

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the items based on the quantity greater than 25.

filter query greater than operator using the microsoft flow

This is how to apply a filter query using the Greater than operator in Power Automate flow.

Power Automate filter query Less than operator

Here we will see how to apply a filter query using the Less than operator in Power Automate.

In this example, we will filter data value where the Quantity is less than using “lt” i.e. Less than operator to filter the data.

  • Create an instant cloud flow, Expand the trigger action, and Add a Number input value for the Product Quantity.
  • Select the Get Items action, to get list items from the SharePoint list and also to apply a filter in the filter query.
  • Provide the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and values to filter.
"Quantity lt '@{triggerBody()['number']}'"

Where,

  • Quantity = Column internal Name
  • lt = Operator
  • {triggerBody()[‘number’]} = Dynamic content value
filter query less than operator in Power Automate

We will create an HTML table to see the output, and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair.

Example to filter query Less than operator Power Automate

Save and Test the flow. Now Enter the Quantity Number to filter the values and click on the Run flow Option.

filter query Less than operator using the microsoft flow

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the items based on the quantity less than 10.

filter query Less than operator using microsoft flow

This is how to apply a filter query using the Less than operator in Power Automate.

Power Automate filter query Greater than or equal to operator

Let us see how to apply a filter query using the Greater than or equal to operator in Power Automate.

In this example, we will filter data value where the Unit Price is greater than or equal to using “ge” i.e. Greater than or equal to operator to filter the data.

  • Create an instant cloud flow, Expand the trigger action, and Add a Number input value for the Unit Price of the Product.
Power Automate filter query Greater than or equal to operator
  • Select the Get Items action, to get list items from the SharePoint list and also to apply a filter in the filter query.
  • Configure the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and enter the number value to filter.
"UnitPrice ge '@{triggerBody()['number']}'"

Where,

  • UnitPrice = Column internal Name
  • ge= Operator
  • {triggerBody()[‘number’]} = Dynamic content value
filter query Greater than or equal to operator in Power Automate

We will create an HTML table to see the result, and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair.

Example to filter query Greater than or equal to operator in Power Automate

Save and Test the flow. Now Enter the Unit Price Number value to filter the values and click on the Run flow Option.

Example to filter query Greater than or equal to operator using flow

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the items based on the Unit Price of the Product being greater than or equal to 1500.

Example to filter query Greater than or equal to operator using Power Automate flow

This is how to apply a filter query using the Greater than or equal to operator in Power Automate.

Power Automate filter query Less than or equal to operator

Here we will see how to apply a filter query using the Less than or equal to operator in Power Automate.

In this example, we will filter data value where the Unit Price is less than or equal to using “le” i.e. Less than or equal to operator to filter the data.

  • Create an instant cloud flow, Expand the trigger action, and Add a Number input value for the Unit Price of the Product.
  • Select the Get Items action, to get list items from the SharePoint list and also to apply a filter in the filter query.
  • Provide the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and values to filter.
"UnitPrice le '@{triggerBody()['number']}'"

Where,

  • UnitPrice = Column internal Name
  • le = Operator
  • {triggerBody()[‘number’]} = Dynamic content value
filter query less than or equal to operator in Power Automate

We will create an HTML table and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair to see the output.

Power Automate filter query Less than operator example

Save and Test the flow. Now Enter the Unit Price number value to filter the values and click on the Run flow Option.

Example to filter query less than or equal to operator using flow

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the items based on the Unit Price of the Product being less than or equal to 280.

Example to filter query less than or equal to operator using Power Automate flow

This is how to apply a filter query using the Less than or equal to operator in Power Automate.

Power Automate filter query startswith

Here we will see how to apply a filter query using the Startswith operator in Power Automate.

In this example, we will filter data value, where the Product Name starting with the name uses the “Start with” string operator to filter the data.

  • Expand the trigger and add a Text input value for the Name of the Product in the instant cloud flow.
  • Add Get Items action, to get list items from the SharePoint list and also to apply a filter in the filter query.
  • Configure the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and values to filter.
startswith(ProductName,'@{triggerBody()['text']}')

Where,

  • startswith= Operator
  • ProductName= Column internal Name
  • {triggerBody()[‘text’]} = Dynamic content value
Example to filter query startswith in Power Automate

We will create an HTML table and add key-value pair to see the output. By selecting the custom option and in the form field pass the dynamic content values and in the columns field.

filter query startswith in Power Automate

Save and Test the flow. Now Enter the Product Name value to filter the values and click on the Run flow Option.

Power Automate filter query startswith example

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the list item values that start with Monitor.

Power Automate filter query startswith

This is how to apply a filter query using the Startswith operator in Power Automate.

Power Automate filter query Endswith

Endswith is not supported in the get items filter query in Power Automate.

Power Automate filter query substringof

Here we will see how to apply a filter query using the substring of the string operator in Power Automate.

In this example, we will filter data value where the Product Name contains the value or not by using substringof i.e. string operator to filter the data.

  • Expand the trigger action, and Add a Text input value for the Product Name in the instant cloud flow.
  • To get list items from the SharePoint list and also to apply a filter in the filter query based on value, select get items action from action triggers.
  • Provide the SharePoint site Address and SharePoint list Name. In the Filter Query field, Pass the Field or Column internal Name, Operator, and values to filter.
"substringof  ('@{triggerBody()['text']}', ProductName)"

Where,

  • ProductName= Column internal Name
  • substringof = Operator
  • {triggerBody()[‘text’]} = Dynamic content value
Apply filter query substringof using flow

We will create an HTML table and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair to see the output.

Apply filter query substringof using the flow

Save and Test the flow. Now Enter the Unit Price number value to filter the values and click on the Run flow Option.

Power Automate filter query substringof example

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the list item values that start with Monitor.

Power Automate filter query substringof

This is how to apply a filter query using the substring of the string operator in Power Automate.

Power automate filter query AND

Here we will be using the below SharePoint List called Products List Consisting of Product Code no, Product Name, Customer Name, Customer Location, Unit Price, Quantity, OrderDate, order priority, and Market Price.

Power Automate Filter Query Multiple Conditions

Let us see how to use the AND operation in SharePoint to get item filter queries using Power Automate.

Here we will use the Products list to filter and get the data where the Unit Price is greater than 230 and the Quantity is less than 10.

Now we will create a flow to apply a filter query dynamically based on the condition applied.

Log in to the Power Automate flow -> Select instant cloud flow -> Enter Flow Name -> Choose Manually trigger a flow option -> Click on the create button like below.

Power automate SharePoint get items filter query and

Expand the trigger action, and Add two Number input values for the ProductUnitPrice and for the Quantity.

Example to get items filter query and operator by using flow

Select the Get items action, and then provide the SharePoint site address and list name. Then click on Show advanced options, In the Filter query field, write the below expression.

"UnitPrice gt '@{triggerBody()['number']}' and Quantity lt '@{triggerBody()['number_1']}' "

Where,

  • UnitPrice, Quantity = Column internal Names
  • gt and lt = Operators
  • {triggerBody()[‘number’]} , {triggerBody()[‘number_1’]} = Dynamic content values
Get items filter query and operator by using Power Automate flow

To see the output create an HTML table, and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair.

Power automate SharePoint get items filter query and operator example

Save and Test the flow. Now Enter the ProductUnitPrice and Quantity Number to filter the values and click on the Run flow Option.

filter query AND operator in Power automate

Once the flow ran successfully like below, we can see the expected result in the HTML table Output section, where it filters and displays the items based on the Unit Price greater than 230 and the Quantity less than 10.

filter query AND operatorusing Power automate flow

This is how to use the AND operation in SharePoint to get item filter queries using Power Automate.

Power automate filter query OR

Let us see how to use the OR operation in SharePoint to get item filter queries using Power Automate.

Here we will use the Products list to filter and get the data where the Customer Location is equal to Canada and the Quantity is less than 10 OR UnitPrice is greater than 230.

  • Create an instant cloud flow, Expand the trigger action. Add two Number input values for the ProductUnitPrice and for the Quantity.
  • Add a text input for the Customer Location.
Power automate filter query OR

Select the Get items action, and then configure the SharePoint site address and list name. Then click on Show advanced options, In the Filter query field, write the below expression.

"CustomerLocation eq '@{triggerBody()['text']}' and (Quantity lt '@{triggerBody()['number_1']}' or UnitPrice gt '@{triggerBody()['number']}')"

Where,

  • CustomerLocation,UnitPrice, Quantity = Column internal Names
  • eq,gt, and lt = Operators
  • {triggerBody()[‘text’]},{triggerBody()[‘number’]} , {triggerBody()[‘number_1’]} = Dynamic content values
Power automate filter query OR operator

We will create an HTML table to see the output, and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair.

Example of Power automate filter query OR operator

Save and Test the flow. Now Enter the ProductUnitPrice and Quantity Number to filter the values and click on the Run flow Option.

filter query OR operator using Power automate

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the items based on the condition applied.

filter query OR operator using Power automate flow

This is how to use the OR operation in SharePoint to get item filter queries using Power Automate.

Power Automate Filter Query Multiple Conditions

Let us see how to get items using filter query with multiple conditions using Power Automate flow.

In this example, we will filter the value where the Product Name is equal to Monitor and Order Date is equal to today minus the last 7 days and Order Priority is Low.

  • Create an instant cloud flow, Expand the trigger action. Add two text input values for the ProductName and for the Order Priority.
power automate odata filter query multiple conditions

Select the Get items action, and then configure the SharePoint site address and list name. Then click on Show advanced options, In the Filter query field, write the below expression.

"ProductName eq '@{triggerBody()['text']}' and OrderPriority eq '@{triggerBody()['text_1']}'  and OrderDate eq '@{addDays(utcNow(),-7,'MM-dd-yyyy')}'"

Where,

  • CustomerLocation,UnitPrice, Quantity = Column internal Names
  • eq,gt, and lt = Operators
  • {triggerBody()[‘text’]},{triggerBody()[‘number’]} , {triggerBody()[‘number_1’]} = Dynamic content values
power automate odata filter query multiple conditions Example

We will create an HTML table to see the output, and in the form field pass the dynamic content values and in the columns field choose the custom option and add key-value pair.

Example to Filter Query with Multiple Conditions in the Power Automate

Save and Test the flow. Now Enter the ProductUnitPrice and Quantity Number to filter the values and click on the Run flow Option.

Filter Query Multiple Conditions using the flow

Once the flow ran successfully, we can see the expected result in the HTML table Output section, where it filtered and displays the items based on the condition applied.

Example to Filter Query with Multiple Conditions in Power Automate

This is how to get items using filter query with multiple conditions using Power Automate.

Conclusion

In this Power Automate tutorial, we have learned how to use the Filter Query operators in Power Automate with different examples.

  • Power Automate filter query equal to operator
  • Power Automate filter query Not equal to operator
  • Power Automate filter query Greater than operator
  • Power Automate filter query Less than operator
  • Power Automate filter query Greater than or equal to operator
  • Power Automate filter query Less than or equal to operator
  • Power Automate filter query startswith
  • Power Automate filter query Endswith
  • Power Automate filter query substringof
  • Power automate filter query AND
  • Power automate filter query OR
  • Power Automate Filter Query Multiple Conditions

You may also like:

>