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
Answered

List values from data versus using date filter

(0) ShareShare
ReportReport
Posted on by 16

I am currently trying to make a power automate flow. I have done the majority of the filters that I need to do however I am stuck at one point. 

 

I need to list the values for the account section and I need to filter it so that 'createdon' equals to three days ago. I am finding this quite difficult to do do and was hoping for some assistance. 'Createdon' is currently formatted like this yyyy-MM-dd.

 

I don't need to do a filter that I find harder.

 

I need to list all the values from between 30 days ago and 3 days ago. 

 

Is anyone confident in this and might be able to help. 😊

 

 

I have the same question (0)
  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: List values from data versus using date filter

    Could you share some sample data or what your data looks like?  Then we might be able to suggest how to create the filter you are looking for.

  • AJ_Zafar Profile Picture
    16 on at
    Re: List values from data versus using date filter

    here is some sample data of what comes up when listing values:

     

    AccountNumber="102360"

    createdon="2020-11-05"

    PrimaryHolder="Mr_J_Stephens"

    SecondaryHolder="Ms_F_Stephens"

    AccountType="FED-334"

     

    AccountNumber="458726"

    createdon="2020-12-12"

    PrimaryHolder="Mr_G_Smith"

    SecondaryHolder="Mrs_G_Smith"

    AccountType="FED-694"

     

    AccountNumber="357542"

    createdon="2020-11-18"

    PrimaryHolder="Mr_D_Higgins"

    SecondaryHolder=""

    AccountType="FED-348"

     

    AccountNumber="145872"

    createdon="2020-12-09"

    PrimaryHolder="Ms_R_Michaelson"

    SecondaryHolder="Mr_K_Michaelson"

    AccountType="FED-282"

     

     

  • AJ_Zafar Profile Picture
    16 on at
    Re: List values from data versus using date filter

    although the formatting looks like this:

     

    "AccountNumber" : "145872"

    "createdon" : "2020-12-09"

    "PrimaryHolder" : "Ms_R_Michaelson"

    "SecondaryHolder" : "Mr_K_Michaelson"

    "AccountType" : "FED-282"

  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: List values from data versus using date filter

    createdon is showing as a string data type, so to filter it you need to generate a filter value that is a string.  Are you trying to get just the ones from 3 days ago or the range from 30 days ago to 3 days ago?  

  • AJ_Zafar Profile Picture
    16 on at
    Re: List values from data versus using date filter

    Apologies for the late reply, i have a power automate that requires one filter for just the ones from 3 days ago and for a separate automate i need one which filters to the range from 30 days ago to 3 days ago?  

  • Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: List values from data versus using date filter

    The filter value for the 3 days ago would be the following

    formatDateTime(addDays(utcNow(),-3),'yyyy-mm-dd')

    Of course depending on your time zone that may be off by a day.  The formula for 3 days ago would then be

    formatDateTime(addDays(utcNow(),-30),'yyyy-mm-dd')

    Those are the string values that you will test createdon against.

     

  • AJ_Zafar Profile Picture
    16 on at
    Re: List values from data versus using date filter

    Hi Pstork1 mate that is fantastic!

     

    Those filters seem to function in my sandbox environment i will test them on the normal one.

     

    i did:

     

    createdon eq formatDateTime(addDays(utcNow(),-3),'yyyy-mm-dd')

     

    am i right in assuming that to get the between value for second power automate it would be:

     

    createdon ge formatDateTime(addDays(utcNow(),-3),'yyyy-mm-dd')

    AND

    createdon le formatDateTime(addDays(utcNow(),-30),'yyyy-mm-dd')

  • Verified answer
    Pstork1 Profile Picture
    68,271 Most Valuable Professional on at
    Re: List values from data versus using date filter

    My only correction would be that I think the first should be le and then second ge.  Otherwise you have this

     

    createdon >= now-3 and createdon <= now -30

     

    That would give you everything that ISN't in the range, not that is.

  • AJ_Zafar Profile Picture
    16 on at
    Re: List values from data versus using date filter

    Sorry for the delayed response as I was finishing the power app to ensure it worked smoothly and it has done! I really appreciate your time and support thank you 😊

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 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard