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 / Copilot Studio / Counting Dynamic Value...
Copilot Studio
Suggested Answer

Counting Dynamic Values in an Array in Copilot Studio

(0) ShareShare
ReportReport
Posted on by 4
Hi All,
 
I have an array [1, 1, 2, 3, 3, 3, 7, 7, 7, 7 etc..] stored in var1. How can I count the occurrences of 1, 2, 3, and 7 in this array in Copilot Studio, considering that the numbers may vary and change dynamically?
Categories:
I have the same question (0)
  • Suggested answer
    Artur Stepniak Profile Picture
    1,539 Moderator on at
    Hello,
     
    I've used this formula to achieve your result:
     
     
    But I think it could be hard to then set variables with counts for each number, because you don't have any loop action, apart from ForAll. I suggest you to use PA flow to count and return the results.
     
    In case of any other questions, let me know. If the answer helped you, mark it, so that others can benefit from it.
     
    Best regards,
     
    Artur Stepniak
    Interested in GenAI? Visit my site!

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 > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 240 Super User 2026 Season 1

#2
Valantis Profile Picture

Valantis 226

#3
Arild Aarnes Profile Picture

Arild Aarnes 73 Super User 2026 Season 1

Last 30 days Overall leaderboard