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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 490

#2
chiaraalina Profile Picture

chiaraalina 149

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 112 Super User 2025 Season 2

Last 30 days Overall leaderboard