Skip to content

Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Problems
  • Triggers
  • Application specific solutions
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
Menu

Power Automate filter on SharePoint calculated column

Posted on September 9, 2020April 14, 2021 by Tom

“I need to use calculated column in a filter but Power Automate always returns Action ‘Get_items’ failed”

“The field ‘MyField’ of type ‘Calculated’ cannot be used in the query filter expression.”


As the error message tells you, in Power Automate you can’t use calculated columns in the Get items’ Filter Query, no matter how hard you try. It is a simple query that can compare only columns with a static value, calculated fields with their dynamic values depending on multiple columns are not supported. Are there any workarounds then?

It depends on what type of formula are you using in the calculated column.

Comparison between multiple columns

=[Column1]>[Column2]

There’s no workaround, the filter can’t compare one column with another. It needs a single column compared to a specific value.

Date operations using multiple columns

=DATEDIF([Column1], [Column2], "d")

Again, no workaround as there’s no specific value to compare with.

Mathematical operations using multiple columns

=[Column1]-[Column2]

No workaround.

Text operations with multiple columns

=CONCATENATE([Column1], " ", [Column2])

Finally something (unless you need to use the text columns in a logical operation, that would be again not possible). If you’re using the calculated column to build a string, you can split it into multiple pieces in the filter. Instead of :

CalculatedColumn eq 'Number One' 

use:

 Column1 eq 'Number' and Column2 eq 'One'.

Operations using just one column

=[Column1]+3 or =IF([Column1]="Number One", "OK", "Not OK")

These can be rewritten into the filter. When you look on it, the formula contains only a single column and a specific value:

 Column1 eq '<value-3>' or Column1 eq 'Number One'

General workaround

There’s also possibility to skip the Filter Query in the Get items / Get files action, get all items from a list / library and implement the filter (incl. formulas with multiple columns) later in the flow using IF conditions. I’d avoid such approach as such flows are slow, difficult to test and difficult to debug.

Summary

In the end, you should consider if you really need to use calculated columns in your flow, maybe there’s another non-calculated column you could use instead.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

1 thought on “Power Automate filter on SharePoint calculated column”

  1. Pingback: Power Automate Reminder sử dụng Ngày trong Cột được Tính toán của SharePoint - SharePoint Châu Âu, Office 365 & Azure Conference, 2022 - Plugin Thanh Toán

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Now available:

The Ultimate Power Automate expressions cheat sheet
Equip yourself with the tool to translate your thoughts into Power Automate expressions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Check if email already exists in Outlook contacts (Power Automate)August 7, 2022
  • Set permissions for a SharePoint list or library with Power AutomateAugust 3, 2022
  • Handle deleted files in synchronised SP library in Power AutomateJuly 31, 2022
  • Create item with lookup column in a dynamic list (Power Automate)July 27, 2022
  • How to move list between SharePoint tenants with Power AutomateJuly 24, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

© 2022 Let's POWER Automate | Powered by Superbs Personal Blog theme