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

Unable to filter array an excel body/value with multiple condition

(0) ShareShare
ReportReport
Posted on by
Hi, I'm currently creating a flow where I try to filter Excel using the filter array. I have successfully run the flow by separating the two filters into one filter for 'less than' and another for 'greater than'. After that, I use the intersection compose. However, I wonder if it is possible to create it into one filter array with multiple conditions. I tried using the formulas below but failed. I hope someone can help. Thanks.

@and(
less(@{item()?['_Start_Date']},@{body('Time_tomorrow')}),
greater(@{item()?['_End_Date']},@{formatDateTime(body('Time_today'),'yyyy-MM-ddTHH:mm:ss.0000000')})
)
I have the same question (0)
  • lbendlin Profile Picture
    8,372 Super User 2025 Season 2 on at
    Unable to filter array an excel body/value with multiple condition
    Where does "body"  come from?  Is that a separate record holding the comparison dates?

    Here's what works for me:

    {
      "type": "Query",
      "inputs": {
        "from": "@outputs('List_rows_present_in_a_table')?['body/value']",
        "where": "@and(less(item()?['Sent'],'2023-10-31T00:00:00.000'),greater(item()?['Sent'],'2023-09-30T00:00:00.000'))"
      },
      "runAfter": {
        "List_rows_present_in_a_table": [
          "Succeeded"
        ]
      }
    }



    Have you considered including the (OData) filter in the Excel call directly?


     
  • Verified answer
    Pstork1 Profile Picture
    68,330 Most Valuable Professional on at
    Unable to filter array an excel body/value with multiple condition
    Try removing all the extra at signs and curly braces. Those should only be in the outermost comparison.  Use this formula instead.
     
    @and(
    less(item()?['_Start_Date'],body('Time_tomorrow')),
    greater(item()?['_End_Date'],formatDateTime(body('Time_today'),'yyyy-MM-ddTHH:mm:ss.0000000'))
    )

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
     
  • Denisss Profile Picture
    on at
    Unable to filter array an excel body/value with multiple condition
    Thankyou Paul. The flow runs as intended.

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

Coming soon: forum hierarchy changes

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

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

#2
Tomac Profile Picture

Tomac 388 Moderator

#3
chiaraalina Profile Picture

chiaraalina 264

Last 30 days Overall leaderboard