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 with mult...
Power Automate
Unanswered

Filter Query with multiple filters for Flow

(0) ShareShare
ReportReport
Posted on by 6

Hi. I am trying to get filtered data from my table in PowerAutomate using Filter Odata query but I am unable to use the OR function to get multiple filters. I am able to use each function independently but if it does not work if I try to get an output using the OR function. Can someone please advise how to use it correctly.

 

These functions work independently (Here 'City' and "CompanyName' are the fields that are inputs and City & CompanyName are from the table)

 

contains(City,'City')

contains(CompanyName,"CompanyName')

 

but if I try to combine it using OR function as below, it does not work in either of these 2 options that I try

 

OR(contains(City,'City'),contains(CompanyName,"CompanyName'))

contains(City,'City') OR contains(CompanyName,"CompanyName')

 

Will appreciate if someone can suggest a solution. Basically, I want to use multiple filters to get the relevant data from a table before processing it

Categories:
I have the same question (0)
  • yashkamdar Profile Picture
    1,044 on at

    Hello Team,

     

    I think you are trying to complicate this, you can simply use an OR'ing like this in OData filter query -

     

    City eq 'City' Or CompanyName eq 'CompanyName'

     

    Here 'City' and 'CompanyName' are dynamic contents.

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @umangsr 

     

    Can you share more details on the data source? If you are using excel, note that this connector has a limitation and can have only one 'eq', 'ne', 'contains', 'startswith' or 'endswith' operation. (source)

     

    One work around for this could be to use one of the columns to filter in the OData itself and then use a condition in Power Automate for the other one. 

     

    You could also try using the filter array action for this. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • umangsr Profile Picture
    6 on at

    Hi @yashkamdar . Thanks for your response. Unfortunately, the OR function is not working in either way you have suggested. 

  • umangsr Profile Picture
    6 on at

    Hi @yashag2255 Thanks for your response. I am using Excel so that could be the reason I am not able to use more than 1 operator. 

     

    Can you elaborate more on the solution that you have suggested about using the columns for filtering.

     

    On Filter array, I am very new to PowerAutomate, so don't have complete knowledge how to use it. If you can share some links for the same, will appreciate. 

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @umangsr 

     

    Hey Mate, 

     

    Excel has always been stubborn,  So I user Filter array action and then pass Multiple condition(It always works for me)...

     

     

    @or(equals(item()?['Country'], 'US'),equals(item()?['Count'], '3'))

     

     

    Untitled.png

     

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Evbelda Profile Picture
    64 on at

    Hi,

     

    The problem is with contains and excel:

    City eq 'City' Or CompanyName eq 'CompanyName' it works

    City eq 'City' Or  contains(CompanyName, 'CompanyName') it doesn't work

    contains(City,'City') Or  contains(CompanyName, 'CompanyName') it doesn't work

    why with multiple choices with contains it doen't work?

     

  • Kamacete Profile Picture
    160 on at

    Hi,

    I'm trying to apply more than one option on the filter, but without success.

    this is what I have.

     

    1.png

     

    I will have to apply another filter for another column, can some one help me it this?

    thank you in advance

    Rui

  • Evbelda Profile Picture
    64 on at

    Finally I found a solution when using filter query. Manualy you should put in the filter Array block:

    (I understand that you are trying to filter contains "Info requested" OR "LT requested" in the filter:

     

    @Anonymous(Contains(Status, 'Info resquested'),Contains(Status,'LT resquested'))

  • Kamacete Profile Picture
    160 on at

    Thank you evbelda

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard