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 / Filtering an Excel Tab...
Power Automate
Answered

Filtering an Excel Table by multiple columns

(0) ShareShare
ReportReport
Posted on by 20

Hello,

 

I would like to set up a quarterly recurring follow up using an excel list, and i need it to filter out certain things in 2 different columns. For example, a few clients do not need this follow up email so i need to filter out their business names, (BusinessName column in my table) aswell as if someone has already sent something in (Status column in my table) i dont want to send them another email following up with them. I have tried using "Filter Query" within "List rows present in a table" but i can only figure out how to make it work with one filter. example (BusinessName eq 'Company Name')

 

Is there a way I can list multiple business names in the filter query along with filtering by the Status column or is there a different way I need to do this?

 

Thanks

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

    Hi @kaylee ,

     

    Is there a way I can list multiple business names in the filter query along with filtering by the Status column or is there a different way I need to do this?

    I'm afraid not , it is a known limitation:

     

    The List rows present in table action supports basic filtering and sorting:
    - Supports the following filter functions: eqnecontainsstartswithendswith.
    - Only 1 filter function can be applied on a column.
    - Only 1 column can be used for sorting.

     

    I think this link will help you a lot:
    https://learn.microsoft.com/en-us/connectors/excelonlinebusiness/?WT.mc_id=BA-MVP-5003630#known-issues-and-limitations-with-actions

     

    In addition , you could use the 'filter array' action to achieve your needs.

     

    Best Regards

    Bof

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Since you can only have a single query within List rows present in a table, I would filter on the Status, then use Filter array to continue the filtering on business.

     

    I've used the following Excel Table for this example.

    grantjenkins_6-1671512920860.png

     

    See full flow below. I'll go into each of the actions.

    grantjenkins_8-1671513367009.png

     

    List rows present in a table has the following expression that will exclude any rows where the status is "Completed"

    Status ne 'Completed'

    grantjenkins_2-1671512466341.png

     

    Initialize variable creates an Array variable called businessList that contains all the businesses I want to exclude. Not sure where you would have your list of businesses.

    grantjenkins_3-1671512550165.png

     

    Filter array takes in the value from List rows present in a table and has a condition to check if the array of businesses does not contain the current business.

    grantjenkins_4-1671512638743.png

     

    The output in this example would be:

    [
     {
     "@odata.etag": "",
     "ItemInternalId": "e93983f1-fb02-4067-b795-696c0d70cc34",
     "Business": "Business 001",
     "Email": "email@business001.com",
     "Status": "In Progress"
     },
     {
     "@odata.etag": "",
     "ItemInternalId": "25c6b5ec-4c8d-4d22-a88d-9ea09d64787b",
     "Business": "Business 006",
     "Email": "email@business006.com",
     "Status": "In Progress"
     },
     {
     "@odata.etag": "",
     "ItemInternalId": "0389cdf6-bf7e-4127-bef1-b2a32f328cb5",
     "Business": "Business 008",
     "Email": "email@business008.com",
     "Status": "In Progress"
     }
    ]

    grantjenkins_7-1671513239228.png

     

    Apply to each can then iterate over each of the items returned from the Filter array and send an email. The expression used to get the email for each business would be:

    items('Apply_to_each')?['Email']

    grantjenkins_9-1671513454461.png

     

  • kaylee Profile Picture
    20 on at

    Thank you SO much!! This is exactly what I needed, and it worked perfectly!

  • kaylee Profile Picture
    20 on at

    @grantjenkins if i wanted to take it one step further and have the flow update the Status column to "Completed" for the people it emailed during the flow, how would I do that?

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    You can add an Update a row action within the Apply to each, so it updates each of the items. Note that this will require you to have a column in your Excel Table that contains unique values (key to uniquely identify each row).

     

    Using the example from before, I've added an Update a row action using the Business column as the unique identifier. The expression used to get the business name for each row is:

    items('Apply_to_each')?['Business']

    grantjenkins_0-1671584363557.png

     

  • chosen67 Profile Picture
    90 on at
    @grantjenkins Super thnx for your extended explanation!
     
    I have a similar flow but need to send multiple attachments (1 per email address). This is done based on an Attachment name in the Excel file. Suggestions on how this step should look?

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard