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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter Query in MS Flow
Power Automate
Unanswered

Filter Query in MS Flow

(0) ShareShare
ReportReport
Posted on by

Hello

 

I'm trying to filter 'Get Items' via Filter query by a field name called 'Roster_Date', basically I intend to retrieve any entries with Roster_Date less then 20 days from now. 

 

Expression picked up right date, but output isn't correct. Basically its pull all the entries in the SharePoint list. Ideally output should be about 100 items or even less.

My Flow Snapshot:

MS Flow_5.JPGlist. 

 

Appreciate if you could pin point where the mistake is please .

 

 

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Filter Query Expression I had used is :

    Roster_Date le formatDateTime(addDays(utcnow(),-20),'MM-dd-yyyy')

  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @Anonymous,

     

    What's the type of the Roster_Date column?

    If it is a string column, it couldn't be compared as Date. When Flow run, they are compared as two numbers, for example:

    two numbers 04-22-2019 and 03-22-2020, 04-22-2019 will greater than 03-22-2020, cause 04 is greater than 03.

    The workaround is to change the Roster_Date column into a Date column. Or change the Roster_Date column's format to "yyyy-MM-dd", then filter query change into Roster_Date le formatDateTime(addDays(utcnow(),-20),'yyyy-MM-dd')

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    on at

    @v-litu-msft Roster_Date is of type 'Date/Time'

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard