web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Count occurrences of a...
Power Automate
Unanswered

Count occurrences of a value in an array

(0) ShareShare
ReportReport
Posted on by 26

Hello,

 

I am looking for solutions to counting the number of times a value occurs within an array.

 

I have a SharePoint list that has an award nomination as an item. I've added columns for each committee member (9 members) to select their vote for that nomination. 

 

I want to build a flow that will get the item, store the values of the vote columns in an array and count the number of times a 'Yes' type vote occurs. I want this to loop through until the 'Yes' value appears 3 or more times in the array (send notification to the committee) or a vote of 'Discussion needed' is selected.

 

I have an idea of how to append the values to an array after the get items though I have not built it yet.

 

Has anyone had a similar scenario or ideas on how to accomplish this?

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    You could use Get Items, filter on Vote eq 'Yes', and then use the Filter Array action for each Nominee; Filter Array - look at the output from Get Items, filter on Employee eq 'Suzy', then length('Filter Array'). 

    Then you can make a condition - if the output of that Length check is equal to 3 or more, then, email the committee. 

    What I'm curious about is - is this all going to happen at once? Or are you re-counting for every vote that comes in? Is this an annual voting kind of thing?

  • cbohlman Profile Picture
    26 on at

    Hi there,

     

    The way I have this set up, is that each nomination is an item on the SharePoint list, and that item has a column for each committee member to assign their vote to that nomination. There are a total of 9 different 'Vote' columns, and any combination of 3 yes's need to trigger the notification of approval.

     

    This actually being added to an existing flow that populates the list with the nomination from a Microsoft Forms. I plan to put the 'Check for Yes's' in a Do Until loop so it can cycle through and check the results of each committee member's vote as they may enter their votes at various times. So this is a repetitive process.

     

    I am not sure I can filter the Get Item by the multiple 'Vote' columns...

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 523

#2
Valantis Profile Picture

Valantis 318

#3
David_MA Profile Picture

David_MA 235 Super User 2026 Season 1

Last 30 days Overall leaderboard