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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter on date with d...
Power Automate
Answered

Filter on date with dynamic value

(1) ShareShare
ReportReport
Posted on by 134
Hi,
I have simple Flow with Dataverse table as my source and trying to apply filter to select records with Date older then 1 week from today.  Tried to apply same syntax how I did on gallery filter (..'Date' < DateAdd(Today(),-7,TimeUnit.Days).     And learned that it doesn't work,  Is it different syntax rules between PApps and PAutomate?
Appreciate if you can guide me if this possible, probably I can use some variable  in my flow ?
Below is little excerpt from my flow
Categories:
I have the same question (0)
  • Verified answer
    stampcoin Profile Picture
    5,153 Super User 2026 Season 1 on at
    You can use adddays()
    formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')
    or 
  • Verified answer
    Tomac Profile Picture
    4,072 Moderator on at
    @CU29071423-0 To expand on @stampcoin's comment, best practice is to always use ISO8601 formatting for dates when doing filters or queries: yyyy-MM-dd (2025-08-22 for today)
     
    As you guessed in your post, Power Automate uses its own syntax for everything. Power Automate Desktop is also different from Power Automate Cloud flows. You get used to it.
     
    If this comment was helpful, please mark it as the answer and also remember to mark @stampcoin's correct comment as the answer.
  • CU29071423-0 Profile Picture
    134 on at
    Thanks StampCoin and Tomac !!
     
    Tried to use this expression in Filter box and got and error:

    An unknown function with name 'utcNow' was found. This may also be a function import or a key lookup on a navigation property, which is not allowed.
     
    in my Filter box I have it like below:
        editdate  lt formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')
  • Verified answer
    Tomac Profile Picture
    4,072 Moderator on at
    You're almost there! You need to copy the expression into the Expression Editor:
     
    So your filter line will look like this:

     
    In the New Editor, it will look like this:
  • CU29071423-0 Profile Picture
    134 on at
    Thanks much  Tomac !!!!!
    Uff, case closed . I start slowly talk PA language

    I tested both Dynamic content    and Expression.  They both work and look  the same after typing and pressing OK.
    I assume Fx symbol  means Expression.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 953

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 622

Last 30 days Overall leaderboard