Skip to main content

Notifications

Power Automate - Building Flows
Answered

Even numbers from a list

(0) ShareShare
ReportReport
Posted on by 38
I have a list of numbers (all greater than 0), and I want to filter out only the even numbers from it using Power Automate. The array may not be sorted, and it can be any positive whole number less than 10,000.
I don't want to create an array of even numbers till 10,000 and then do intersection. Is there a better scalable solution please?
 
  • Input Array: [1, 2, 3, 4, 5, 6, 7, 8]

Output:
[2, 4, 6, 8]

 

 

  • Verified answer
    Mitanshu Profile Picture
    Mitanshu 1,604 on at
    Even numbers from a list
    You can use `filter` action in Power Automate with `mod` expression.
     
    `mod(item(),2) == 0` -- this will give you even numbers.
     
    You will now get an array containing only even numbers
     
     

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard