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 / Conditional Function b...
Power Automate
Unanswered

Conditional Function based on Excel table with a Query Filter and using date range

(0) ShareShare
ReportReport
Posted on by 46

Here is my flow, scheduled to run once a week.

ABoyNamedSue_0-1698101448644.png

The List row present in a table action has a Filter Query and when I test it, it works as expected.

ABoyNamedSue_1-1698101931625.png

Here is where I need help. For my condition, I need it to look for a date range for the past seven days. The flow is scheduled to run on Wednesdays, and the date range should be from the Tuesday before to the previous Wednesday. I know I can have this set up to run based on the current date but cannot get the right expression to make it happen. I also tried to initialize variables for the date and get nothing but error messages when trying to save. 

 

I appreciate your help!

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    Please define what you mean by "current date".  UTC or local timezone?

  • ABoyNamedSue Profile Picture
    46 on at

    Hi @lbendlin,

    I am UTC-6. The automation I am running is goes to all US states and territories. I have it scheduled to run at 1300 local time, so it is not too early or late for the majority of the time zones (sorry people in Guam). If I use UTC, would it not be the next day and throw off the dates?

  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at
    convertFromUtc(utcNow()-7,'Central Standard Time','yyyy-MM-dd')
  • ABoyNamedSue Profile Picture
    46 on at

    Using that expression gives me an error message.

     

    ABoyNamedSue_0-1698178847905.png

     

  • Verified answer
    lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    sorry about that.

     

     

    convertFromUtc(addDays(utcNow(),-7),'Central Standard Time','yyyy-MM-dd')

     

  • ABoyNamedSue Profile Picture
    46 on at

    Thanks! Tested it and success!

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard