# OData Filter Query in Power Automate: Syntax Guide

> For the full documentation index, see https://250highstreet.com/llms.txt

> Write an OData filter query in Power Automate with eq, ne, gt, and, or, contains and startswith. Syntax rules, quote escaping and where each action differs.

An OData filter query is a short text rule that tells an action which rows to return. It has the form column, operator, value, such as stringColumn eq 'string', and you can join rules with and, or and not.

## What are the basic operators?

Use parentheses to set the order, for example (contains(name,'sample') or contains(name,'test')) and revenue gt 5000. Microsoft says a comparison can also test two columns in the same row, if the column types match, such as firstname eq lastname.

| Operator | Meaning | Microsoft's example |
|---|---|---|
| eq | Equal | revenue eq 100000 |
| ne | Not equal | revenue ne 100000 |
| gt | Greater than | revenue gt 100000 |
| ge | Greater than or equal | revenue ge 100000 |
| lt | Less than | revenue lt 100000 |
| le | Less than or equal | revenue le 100000 |
| and | Both rules true | revenue lt 100000 and revenue gt 2000 |
| or | Either rule true | contains(name,'(sample)') or contains(name,'test') |
| not | Flips a rule | not contains(name,'sample') |

## Where do you type the query?

The Filter Query box is separate from the Filter array action. See our guide on [Filter array](/guides/power-automate-filter-array/) for filtering data you already have in the flow.

| Action | Box name | Notes from Microsoft |
|---|---|---|
| SharePoint Get items | Filter Query | Sample in the help text: stringColumn eq 'string' OR numberColumn lt 123. Also has Order By and Top Count. |
| Excel Online (Business) List rows present in a table | Filter Query | Filter functions: eq, ne, contains, startswith, endswith. One filter function per column, one column for sorting. |
| Dataverse List rows | Filter rows | Example: createdon ge 2021-01-01T00:00:00-00:00. Also Select columns, Sort by, Row count and Expand Query. |

## Which text functions work?

Dataverse supports contains, startswith and endswith, such as contains(name,'(sample)') or endswith(name,'Inc.'). Put not in front to flip the result. Microsoft says string filters in Dataverse are case insensitive.

Do not start a value with a wildcard. Microsoft says leading wildcards such as startswith(name,'%value') are not supported and slow the query.

The Excel connector's filter functions are eq, ne, contains, startswith and endswith. Do not assume every action supports every function. Check the connector page on Microsoft Learn for the action you use.

## How do you handle quotes and special characters?

For a single value that has an apostrophe, type two single quotes in a row. Microsoft's example is lastname eq 'O''Bryan'. Without it you get an error like there is an unterminated literal.

In the Dataverse List rows action, replace characters such as &, # and + with their URL-encoded form. For example, + becomes %2B, & becomes %26 and # is encoded too. Do not type the text $filter= inside the box, because Microsoft says the box does not accept it.

## How do you sort and trim the result?

- Sort by (Dataverse): add asc or desc after the column, for example name desc. The default order is ascending.
- Order By in SharePoint and Excel takes an OData order expression. Excel supports one column for sorting.
- Select columns (Dataverse): a comma-separated list, such as name,createdon,preferredcontactmethodcode,emailaddress1,telephone1.
- Row count (Dataverse): the number of rows you want back.
- Top Count (SharePoint and Excel): total entries to retrieve, default all.

## What limits should you know?

These are the limits Microsoft's Dataverse and Excel connector pages list as of November 2026.

- Excel's Filter Query, Select Query and Order By boxes accept only column names made of letters and numbers, and OData parameters are not supported for tables with hidden columns.
- Excel List rows gives 256 rows unless you switch on pagination.
- Dataverse List rows returns up to 5,000 rows by default. You can turn on Pagination in Settings and set a Threshold up to 100,000.
- Dataverse allows up to 500 total conditions in one query.
- Excel filters may show slightly old data, since Microsoft says there may be some delay when filtering or sorting is used.

## Where does the filter usually go wrong?

Check these first: a wrong column name, a missing quote around text, or a filter on a column type the action cannot filter. Our guide on [the SharePoint Get items filter query not working](/guides/power-automate-get-items-filter-query-not-working/) covers the error side.

If your list view also needs a filter by the signed-in person, see [filter a SharePoint list view by current user](/guides/sharepoint-list-view-filter-current-user/). If a view filter hides values, see [filter not showing all values](/guides/sharepoint-list-filter-not-showing-all-values/).

## Need a flow that filters cleanly?

Al Davies builds tools that cut busywork and missed steps for teams. If a filter keeps breaking, bring it to a first call. The first call is free and takes 45 minutes.

## FAQ

### Is OData filter syntax the same in every action?

The core is the same: column, operator, value. Function support differs by connector, so check the action's page.

### Can I use or in a filter query?

Yes. Microsoft's SharePoint example uses OR between two rules, and the Dataverse page lists and, or and not.

### Do text values need quotes?

Yes. Wrap text in single quotes. Type two single quotes for an apostrophe inside the value.

### Is a text filter case sensitive?

Microsoft says string filters in Dataverse are case insensitive.

### Why do I only get 256 Excel rows?

The Excel List rows present in a table action stops at 256 rows until pagination is switched on.

## Sources

- [Filter rows using OData (Microsoft Learn)](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query/filter-rows)
- [Use lists of rows in flows (Microsoft Learn)](https://learn.microsoft.com/en-us/power-automate/dataverse/list-rows)
- [SharePoint connector (Microsoft Learn)](https://learn.microsoft.com/en-us/connectors/sharepointonline/)
- [Excel Online (Business) connector (Microsoft Learn)](https://learn.microsoft.com/en-us/connectors/excelonlinebusiness/)

## Related guides

- [Power Automate Filter Array: Steps and Examples](/guides/power-automate-filter-array/)
- [Power Automate Get Items Filter Query Returns Nothing: Fix](/guides/power-automate-get-items-filter-query-not-working/)
- [SharePoint List View Filter for Current User: [Me]](/guides/sharepoint-list-view-filter-current-user/)
- [SharePoint list filter not showing all values: what to check](/guides/sharepoint-list-filter-not-showing-all-values/)
- [How much does Power Automate cost?](/guides/power-automate-pricing/)
- [Why does my SharePoint flow start minutes after the change?](/guides/power-automate-sharepoint-trigger-takes-minutes/)

Source: https://250highstreet.com/guides/power-automate-odata-filter-query/
