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 / How to use filter arra...
Power Automate
Answered

How to use filter array to filter all dates coming due within next 30 days?

(0) ShareShare
ReportReport
Posted on by

How can i use filter array to filter all dates coming due within next 30 days?

 

I tried using the below expressions but not of them are working.

 

Expressions

contains(item()?['Visa Expiry Date'], addDays(utcNow(), 30))

 

contains(item()?['Visa Expiry Date'], addDays(utcNow(), 30,'yyyy-MMM-dd'))

 

contains(item()?['Visa Expiry Date'], addDays(utcNow(), 30,'dd-MMM-yyyy'))

 

aurav_0-1664796213701.png

 

 

Data

 

 

Expiry Date

31-Mar-23
14-Feb-23
27-Feb-23
13-Sep-23
17-Oct-22
17-Oct-22
14-Nov-22
17-Oct-22
25-Jan-24
19-Jul-24
20-Jul-24
27-Feb-23
13-Oct-23
7-Mar-23
1-May-23
25-Jan-24
20-Jul-24
30-May-24

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @aurav ,

     

    Since you will need combine two conditions together in Filter array action (later than current date AND earlier than 30 days after current date), please use the advanced mode to edit the expression:

    @and(greater(addDays('1899-12-30', int(item()?['Expiry Date']), 'dd-MMM-yyyy'), formatDateTime(utcNow(), 'dd-MMM-yyyy')),lessOrEquals(addDays('1899-12-30', int(item()?['Expiry Date']), 'dd-MMM-yyyy'), addDays(utcNow(), 30, 'dd-MMM-yyyy')))

    vjefferni_0-1664872737398.png

     

    Best regards,

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard