Skip to main content

Notifications

Community site session details

Community site session details

Session Id : XLg3TFZVosMD57wdWwho5J
Power Automate - Building Flows
Unanswered

How can i add multiple filter array condition into one?

Like (0) ShareShare
ReportReport
Posted on 30 Sep 2022 06:42:46 by

How can i add both/multiple filter array condition into one?

 

aurav_0-1664519626817.png

 

Filter Array 1

@lessOrEquals(item()?['Contract End Date'], variables('Current Date'))

Filter Array 2

@contains(item()?['Client Status '], 'Active')

 

I tried the below expression in the advance mode but it is not working.

 

@lessOrEquals(item()?['Contract End Date'], variables('Current Date')),contains(item()?['Client Status '], 'Active')

 

Logic

I want to filter all dates equal to/Less than today and the client status is Active

 

Thank you.

 

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 02 Oct 2022 at 14:49:46
    Re: How can i add multiple filter array condition into one?

    @aurav 

     

    Looks like you probably have a lower level license where you can only load 5000 at a time.

     

    If your Excel has more than 5000 rows you can…

    -Upgrade your license

    Or

    -Add an index column to your Excel table. Then add multiple List rows actions set to sort the outputs by the index column ascending, and to filter to where IndexColumn gt ‘@last(body(List_rows_present_in_table)?[‘IndexColumn’]’

    You’ll need to use the body of each previous List rows action in that expression as you add more. But it’s basically the logic for “Give me the next 5000 rows with indexes greater than the last 5000 rows”.

  • Community Power Platform Member Profile Picture
    on 02 Oct 2022 at 14:38:08
    Re: How can i add multiple filter array condition into one?

    Hi @takolota  - When I am trying to add 10000 it gives me an error that maximum value allowed is 5000. Is there a way i can increase this to 10000?

     

    aurav_0-1664721426093.png

     

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 02 Oct 2022 at 12:22:51
    Re: How can i add multiple filter array condition into one?

    @aurav 

    Is your List rows action actually pulling all the rows in?

     

    By default it may only pull in a few hundred or a few thousand. You’ll want to go to the 3 dots at the top right of that action, go to settings, turn on pagination, then enter 100000 as the pagination value.

  • Community Power Platform Member Profile Picture
    on 02 Oct 2022 at 08:05:45
    Re: How can i add multiple filter array condition into one?

    Hi @takolota  - I have 1500 rows in the excel that need to be filter, but the flow only filters 1/3rd of the list. What could be the reason?

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 01 Oct 2022 at 18:48:59
    Re: How can i add multiple filter array condition into one?

    @aurav 


    It looks like you have spaces in your field names. Spaces are escaped characters so you’ll want to replace them with underscores.

     

    If you want to ensure your expressions are correct, you can use the basic Filter array condition maker to create each half of the expression. Like use the basic editor to create the Contract End Date less or equal to Current Date, then switch it to advanced mode, copy that expression built in the basic editor to a notepad, then do the same for the other half of the expression, then combine them in the @and( … , … )

     

    @Expiscornovus Ah you’re right, I just read mostly the headline & missed the last line. My bad.

  • Community Power Platform Member Profile Picture
    on 01 Oct 2022 at 18:41:00
    Re: How can i add multiple filter array condition into one?

    Hi @Expiscornovus  - I have tried the below expression but both of them is not working. Is there any other way I can handle the filer?

     

    @and(lessOrEquals(item()?['Contract End Date'], variables('Current Date')), contains(item()?['Client Status '], 'Active')

     

    @or(lessOrEquals(item()?['Contract End Date'], variables('Current Date')), contains(item()?['Client Status '], 'Active'))

     

     

    aurav_0-1664649586255.png

     

     

     

    aurav_1-1664649595549.png

     

  • Expiscornovus Profile Picture
    31,643 Most Valuable Professional on 30 Sep 2022 at 12:14:29
    Re: How can i add multiple filter array condition into one?

    Hi @takolota,

     

    In the opening post I saw the sentence:

    "I want to filter all dates equal to/Less than today and the client status is Active"

     

    That's why I suggested an and 😁

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 30 Sep 2022 at 10:51:02
    Re: How can i add multiple filter array condition into one?

    @Expiscornovus @aurav 

     

    If he wanted to combine the two, like in a union, wouldn’t that require an Or not an And statement?

     

  • Expiscornovus Profile Picture
    31,643 Most Valuable Professional on 30 Sep 2022 at 08:28:54
    Re: How can i add multiple filter array condition into one?

    Hi @aurav,

     

    You can use an and function for this.

     

    Try the following expression in one Filter Array:

    @and(lessOrEquals(item()?['Contract End Date'], variables('Current Date')), contains(item()?['Client Status '], 'Active'))

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,662 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard