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 / Create an array of low...
Power Automate
Unanswered

Create an array of lowest values, from an array of values.

(0) ShareShare
ReportReport
Posted on by 12

I'm working on a flow that gets a random item from Excel, based on a weight value. After that random item is found, the weight would increase by 1, so as to not be picked again, until all other items have been picked.

I have a working flow that for now, does all of this methodically in order (Item 1, then Item 2, then Item 3, etc...)

I'm trying to figure out how to build a new array of "lowest weights" from my array of "weights".

Currently, my array of weights looks like this:

 

[
 3,
 4,
 2,
 4,
 3,
 2,
 4,
 2,
 3,
 3
]

 

With this array, you can see there are 3 items with weight "2". I want to gather all items with weight "2" and make a new array of these items.

 

[
 2,
 2,
 2
]

 

From here, hopefully I'll be able to reference the correct line item to pull a random item from this new "sub array".

I'm not sure exactly how to do this however, and was hoping for some guidance.

 

Categories:
I have the same question (0)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 376

#2
Valantis Profile Picture

Valantis 361

#3
David_MA Profile Picture

David_MA 294 Super User 2026 Season 1

Last 30 days Overall leaderboard