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 / Multiple filter excel ...
Power Automate
Unanswered

Multiple filter excel query

(0) ShareShare
ReportReport
Posted on by

I would like to add 2 conditions in the filter query for the same excel table.

Is there any alternate methods to check conditions for filter query in the same excel table at the same time?

 

 

Thinzar_0-1705380593786.png

Thinzar_1-1705380611619.png

 

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    on at

    Hi , @Thinzar 

    Can you show your error code in your action?

    Also , you can try to check if you use the correct column Name in filter query. And try to use this code:

    (Preferences eq 'Weekly Wednesday Evening') and (PreferredContentTypes eq 'Text')

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Thinzar 

     

    You could use filter array action to perform the filter operation with multiple conditions.

     

    Here is an example:

    ManishSolanki_0-1705382455049.png

    Filter query used in the above screenshot:

    @and(equals(item()?['From'], '1'),equals(item()?['To'], 'r'))

    Here, From & To are the columns in excel sheet.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

    Thanks

  • Thinzar Profile Picture
    on at

    The error status is Bad Request and I have changed and checked the column and used the script you provided.

    It still fails when I test it.

    Thinzar_0-1705382826698.pngThinzar_1-1705382859722.png

     

  • v-yueyun-msft Profile Picture
    on at

    Hi , @Thinzar 

    I test it in my side , it seems that we can not use the multiple conditions in the "list rows in a present table" action.Sorry for i may confused by the "Get items" action...😅

    You can use the @ManishSolanki method to use filter array after List row present in a table and use multiple conditions:

     

     

     

    @and( equals(item()?['Preferences '], 'Weekly Wednesday Evening') , equals(item()?['PreferredContentTypes '], 'Text') )

     

     

     

    vyueyunmsft_0-1705383640900.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • Thinzar Profile Picture
    on at

    Hello, I have also tried with Filter Array provided by @ManishSolanki . I would like to send emails filtered by the above columns. However, after filtering the array, I cannot get the filtered items in order to send the email. What should I do?

     

    Thinzar_0-1705398615872.png

     

  • v-yueyun-msft Profile Picture
    on at

    Hi , @Thinzar 

    You can try to directly use the expression:

    body('Filter_array')

    vyueyunmsft_0-1705469526228.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

  • Thinzar Profile Picture
    on at

     

    Thanks for your help @v-yueyun-msft

    However, my problem has not been solved completely. 

    Could you please have a look into it?

     

    I would like to use separate filtered columns from the excel separately in sending email as dynamic contents.

    I am stuck in this stage. I cannot use body from filtered array in "Apply to each" input. It says invalid template.

     

    I would like to set variable with each email and send contents to that filtered email. 

    Thinzar_0-1705479323672.png

     

    Thinzar_1-1705479332586.png

     

    Sorry for my bad explanation. The main purpose is that I want to use each filtered data like this in below screenshot.

    Thinzar_2-1705479478941.png

     

     

  • v-yueyun-msft Profile Picture
    on at

    Hi , @Thinzar 

    According to your error code , it seems you use the body/value , can you try to directly use this code in your apply to each loop:

    body('Filter_array')

     

    Best Regards,

    Yueyun Zhang

  • Thinzar Profile Picture
    on at

    Thank you for your help.

    I have fixed the expression in "Apply to each"

    However, when I test the flow, this error occurs.

    I want to send email to those two filtered emails.

    How can I correct this error?

    Thinzar_0-1705481477542.png

     

     

  • v-yueyun-msft Profile Picture
    on at

    Hi, @Thinzar 

    Can you show your send Email V2 error code in your flow? And how dose your put in your send Email V2 action?

    vyueyunmsft_0-1705481639478.png

    And can you show your Append to string variable action configuration?

     

    Best Regards,

    Yueyun Zhang

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