How to rank arrays of numbers.(Power Automate Cloud flows)

Japanese version.

Steps

Power Automate alone is too much work, so we will utilize an Excel sheet.

Create a table with the items "Value" and "Rank" on the sheet for calculation.

No data rows are required.

Place this Excel file in a location that can be accessed by Power Automate, such as OneDrive.

Prepare array variables.

Repeat the items of the array variable with "Apply to each".

The rank is calculated using the RANK.EQ function.

Set up "Add a row into a table" in "Apply to each" and specify the following

ParameterValue
Location
Document Library
File
Table
The location of the target Excel file and the table name.
ValueCurrent item
Rank=RANK.EQ([@Value],[Value])

Executing this flow will set the ranking on the Excel sheet.

The contents of this Excel file are retrieved by "List rows present in a table".

This allows Power Automate to retrieve the rankings.

---

Links

Tips.(Power Automate Cloud flows)