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 / Max of column in array
Power Automate
Unanswered

Max of column in array

(0) ShareShare
ReportReport
Posted on by

I have an array of dates and prices and I want to calculate the maximum date.

Skærmbillede 2023-09-21 kl. 18.55.18.png

To get the max function to work I have added an extra column with the datetime as an integer in the select statement:

Skærmbillede 2023-09-21 kl. 18.57.07.png

How do I get the maximum date of this select component?

 

 

Extra information:

The date and price arrays are per product. So the flow is using an apply to each component to run over all products and then trying to find the maximum date. 

I have used an approach I found somewhere else where an empty variable is initialized and then the date is appended to that variable. This results in a variable with just the dates and not the column title. This way the maximum can be found.

The problem with this approach is in the concurrency. To get the flow to run at a reasonable pace the concurrency control has been set to 50. This means that the variable is overwritten as all the apply to each components are running.

Any suggestions?

 Skærmbillede 2023-09-21 kl. 19.12.37.png

Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @RasmusThomsen ,

    Why don't you use a child flow that returns the maximum date based on the Date array you send to it?

    That should get you around the concurrency issue.

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard