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 / Power Automate Randomi...
Power Automate
Unanswered

Power Automate Randomization Shuffle

(0) ShareShare
ReportReport
Posted on by 34

Hello,

I need assistance in creating a build that can create a random picker to pull 5% of the data population. I've created these steps so far, with this expression under the compose action.

body('List_rows_present_in_a_table')?['value'][rand(1, length(body('List_rows_present_in_a_table')?['value']))]

 

However, this will only pick 1 random item from the list. How can I update it to choose 5% of the population?

 

tliwanag_0-1706540598522.png

 

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,704 Super User 2026 Season 1 on at

    This is not totally random, but maybe random enough.

    The idea is to add a property 'Sort' with a random number.

    Then sort by this number and take the first 5% items.

     

    Chriddle_0-1706550554419.png

    Select

    Just generates some objects

     

    Select 2

    Adds the Sort property

    Map:

     

     

    addProperty(
    	item(),
    	'Sort',
    	rand(0, 1000000000)
    )

     

     

    Use a high limit to reduce the probabilty of duplicates.

     

    Compose

    Sorts by the random numbers and takes the appropriate amount of items

     

     

    take(
    	sort(
    		body('Select_2'),
    		'Sort'
    	),
    	div(
    		length(body('Select_2')),
    		20
    	)
    )

     

     

     

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
Valantis Profile Picture

Valantis 460

#2
Vish WR Profile Picture

Vish WR 343

#3
David_MA Profile Picture

David_MA 249 Super User 2026 Season 1

Last 30 days Overall leaderboard