web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Filtering Completed Tasks to the last 30 days

(0) ShareShare
ReportReport
Posted on by 7

Hi

 

I am trying to create a scheduled flow which lists all tasks in a Planner Bucket which are completed.

 

I can filter the results to only show those which are 100% complete, and I can get that to send a table via email in HTML.

 

However, I cannot seem to be able to filter the list to show only the last 30 days. 

 

I have tried to filter with Less Than or Equal to "addDays(utcNow(),-30)" but this doesn't work.

 

Can someone please guide me to how I can filter results into the last 30 days please?

I have the same question (0)
  • Expiscornovus Profile Picture
    32,852 Most Valuable Professional on at
    Re: Filtering Completed Tasks to the last 30 days

    Hi @GazNicki,

     

    I think you are pretty close to the solution. However, how are you filtering your tasks? Are you using a condition action?

     

    If so, I would add an additional check if the completedDateTime is not empty. Otherwise your filter will fail for the tasks which haven't completed yet. I would also change the less than or equal to, to greater than or equal to.

     

    Example with a task which is completed on the 12th of January:

    12-01-2021 is greater than or equal to 02-01-2021 (utcnow() - 30 days)

     

    Try the below approach if possible.

     

    1. Add a condition within an apply to each action. Use the following two conditions with AND.

    empty(items('Apply_to_each')?['completedDateTime'])

    is not equal to true

    AND

    items('Apply_to_each')?['completedDateTime']

    is greater than or equal to

    addDays(utcNow(), -30)

     

    greatherthan30days.png

     

    Hope this helps a bit?

  • GazNicki Profile Picture
    7 on at
    Re: Filtering Completed Tasks to the last 30 days

    Hi @Expiscornovus 

     

    I was using Filter Array, and can't seem get the conditional to work. Unfortunately my skills in this are very very basic. I'm sorry 😞

  • Expiscornovus Profile Picture
    32,852 Most Valuable Professional on at
    Re: Filtering Completed Tasks to the last 30 days

    Hi @GazNicki,

     

    Can you share a couple of screenshots of your current flow setup? I can adapt my example to that setup to help you out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard