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

Japanese version.


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

There will be two tables in the Excel book.

The first is an empty table to which the array values will be added.

In the sample, it is named "ValueTable".

The second table is for median calculation.

In the sample, it is named "ResultTable".

This table has an expression set in the first row with the MEDIAN function.

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

Next, prepare an array variable of numbers.

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.

Document Library
The location of the target Excel file and the table name.
ValueCurrent item

This flow will set the median value in the "ResultTable" of 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 median.



Tips.(Power Automate Cloud flows)