Skip to main content

Notifications

Community site session details

Community site session details

Session Id : qtt6yMguIvFlNmeylx2HuZ
Power Automate - Building Flows
Answered

Filtering an Excel Table by multiple columns

Like (0) ShareShare
ReportReport
Posted on 19 Dec 2022 21:32:29 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

  • chosen67 Profile Picture
    90 on 30 Oct 2024 at 15:48:01
    Filtering an Excel Table by multiple columns
    @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?
  • Verified answer
    grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on 21 Dec 2022 at 01:01:18
    Re: Filtering an Excel Table by multiple columns

    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

     

  • kaylee Profile Picture
    20 on 20 Dec 2022 at 16:46:37
    Re: Filtering an Excel Table by multiple columns

    @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?

  • kaylee Profile Picture
    20 on 20 Dec 2022 at 16:25:28
    Re: Filtering an Excel Table by multiple columns

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

  • Verified answer
    grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on 20 Dec 2022 at 05:18:05
    Re: Filtering an Excel Table by multiple columns

    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

     

  • v-bofeng-msft Profile Picture
    on 20 Dec 2022 at 00:56:26
    Re: Filtering an Excel Table by multiple columns

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard