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 reminder using date in SharePoint calculated column

Posted on February 24, 2021January 11, 2022 by Tom

“The Power Automate flow works if I use a date formatted SharePoint column, but I need a reminder based on a calculated date from another date column.”

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


When you calculate a date or a number of days in SharePoint, you might not want to end there. Sure, it’s nice to display the date/number of days in the list view, but you can take it one step further. You can build a Power Automate flow that would send a reminder on that date or after that number of days.

But once you try to use that calculated column in a Filter Query, Power Automate won’t like it. “The field ‘CalculatedDate’ of type ‘Calculated’ cannot be used in the query filter expression.” You can’t use calculated columns in the OData filter query. But you can rebuild the whole calculation into an expression, and use that expression in the Filter Query.

Building the Filter Query

You should take one step back and look on the formula in the calculated column. What do you calculate? Is it a number of days from a date until today? Or do you add time period to a date? Which existing date column you use?

Especially the last question is important. When building a Filter Query in Power Automate, you need some ‘fixed’ points. One of them is the ‘base’ date column as that’s a column you can use. The second is today’s date provided by the utcNow() expression (as you’ll check if today is the ‘reminder’ day). Every Filter Query must be build around them.

Number of days from a date

Let’s take the first situation, you want to send a reminder after a number of days since SharePoint item was created, e.g. 7 days. You might use the JSON column formatting to calculate the number of days in the list view with the following formula:

=floor((Number(@now)-Number([$Created]))/(1000*60*60*24))

The full formula is explained in the post linked above, for this post it can be a bit simplified. @now is JSON placeholder representing today’s date:

= today - Created

Since you want to send the reminder on the 7th day, you can add 7 to the equation:

7 = today - Created

As already said, the filter must use the ‘base’ date, an existing date column. In this situation it’s the Created date that must be moved to the left side of the equation. That will give us the Filter Query to use:

Created = today - 7

Created eq 'addToTime(utcNow(),-7,'day','yyyy-MM-dd')'
SharePoint calculated reminder Power Automate

Note: you must always use the column internal name on the left side of the filter.

Adding a time period to a date

The other situation is when you calculate a date in the calculated column by adding a time period. For example, you add 1 month to a Date date column and you want to send a reminder on that date. Let’s start here from the simplified formula:

= Date + 1 month

You want to send the reminder only if today is the date:

today = Date + 1 month

Again, the Filter Query must be based on a date column. Here we’ve got the column Date and it must be moved to the left side of the equation:

Date = today - 1 month

Date eq 'addToTime(utcNow(),-1,'month','yyyy-MM-dd')'
SharePoint calculated reminder Power Automate

Summary

Power Automate doesn’t allow you to use SharePoint calculated columns in the Filter Query, but that doesn’t mean that you can’t “use them” for a reminder. Calculated column is just a formula using other columns, and as such you can replicate it from scratch in Power Automate.

This post is about replacing such calculated date column in the Filter Query with a ‘base’ date column and an expression. It is the main part of Power Automate reminder process, once you can filter the relevant items, you can send the reminder.

If you’d like to see the full reminder flow, there’re already two posts on this topic. The first one is sending reminders for Date only columns and it uses similar Filter Query as described above: how to build basic reminder flow. You can also build a bit more complex flow to send multiple reminders for various time periods.

The second reminder flow is designed for Date and Time columns. With Date and Time columns you can’t use the ‘equals date’ operator as the time will be rarely equal. You must work with a range ‘less than date’ and ‘greater than date’ as you can see in the event reminder flow.

And there’s also a post where you can learn more about the addToTime(…) expression I used.


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.

8 thoughts on “Power Automate reminder using date in SharePoint calculated column”

  1. Claudia says:
    April 8, 2021 at 9:41 am

    Hi Tom,

    Thank you for your interesting and useful article.
    I have a question for you: is it possible to create a reminder flow which should be sent only to the approvers who did not take any action?

    Thank you
    Claudia

    Reply
    1. Tom says:
      April 8, 2021 at 8:09 pm

      Hello Claudia,
      if it’s an approval task with multiple ‘Assigned to’ users then unfortunately Power Automate won’t give you the interim results, it’ll give you all the information only after all users approve. It’s not possible to send a reminder only to the users who didn’t complete their task.

      Reply
  2. Anne says:
    June 2, 2021 at 9:58 am

    Thank you for your useful article.

    I follow the steps descripted in the article to build the flow, the flow runs successfully, but I can’t receive the reminder email. Do you have any ideas for that?

    Reply
    1. Tom says:
      June 6, 2021 at 8:26 pm

      Hello Anne,
      it’s hard to analyse without more information, try to check this older article if you’ve got the right date format, if your SP columns doesn’t include time, etc.

      Reply
  3. RF says:
    September 29, 2021 at 6:17 am

    How to filter “get items” that is on the same month/year as current date.
    Example the Created date column value is 09/15/2021 or 09/01/2021 and current date is 09/29/2021.
    If the Created date column value is 08/25/2021 then if won’t be included because it is not the same month/year.

    Reply
    1. Tom says:
      October 3, 2021 at 7:04 pm

      Hello RF,
      take a look on the new post: https://tomriha.com/filter-sharepoint-items-with-date-in-the-same-month-in-power-automate/

      Reply
  4. Paula D says:
    April 7, 2022 at 4:55 pm

    I am a little dense when it comes to building queries. I have a scenario in which I want an email reminder sent to the “person assigned” 90 days prior to the due date. There’s no templates for due date reminders, and I don’t understand how to code. I wasn’t even sure I was using the right logic. I created a flow, figured out how to select my sharepoint site and list, but then it get’s pretty confusing for me. I’m good at creating sharepoint lists and sites, but I don’t understand how to integrate any of the power apps to really make it efficient. If anyone could help, I would greatly appreciate it.

    Reply
    1. Tom says:
      April 13, 2022 at 2:33 pm

      Hello Paula,
      if it’s 90 days before some Due date then you must base the Filter Query on the due date as described in the post:
      DueDateInternalName eq ‘addDays(utcNow(),90,’yyyy-MM-dd’)’

      Reply

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.

  • Format results of date calculation in SharePoint columnJune 29, 2022
  • Why is your Power Automate flow creating duplicatesJune 26, 2022
  • How to create a unique identifier in your Power Automate flowJune 22, 2022
  • How to assign custom SharePoint permission level with Power AutomateJune 19, 2022
  • Remove permissions from a specific SharePoint user with Power AutomateJune 15, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

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