I have LIST 1 on which I need to do some summary statistic and put this in LIST 2, like shown below (only small sample to illustrate):

enter image description here

I've wanted to do this using MS Flow, but I don't see proper function for calculating Average in Math section. "Compose" do not provide such option. I've tried by initializing variable for Average and wanted to update it using "Set variable" with formula =AVERAGE([DELIVERY_DELAY_DAYS]) but that is not accepted. Can you suggest how to do this?

Important note: I need to calculate Average for values in LIST 1 <> 0

1 Answer 1


Flow(we now call it "Power Automate") does not provide an built-in solution to calculate the average of a column. We will need to do it by a loop to get the total of the column and the number of the items. As you want to calculate average for values <>0, a bit more work need to do with the filter in get items.

Get the total of a column

Use Microsoft Flow to get the number of items in a SharePoint list or library

I made a test flow and works properly in my end combining the two flow.

  • Thanks for suggestion. I have initialized 2 variables: SumDelayed and NumberDelayed. Then used "Increment Variable" to get two components needed to calculate Average. Now I need to divide SumDelayed by NumberDelayed. I have tried to do this in "Update item" in column "AVERAGE_DELAY_DAYS but division using / is not accepted.
    – zwornik
    Commented Apr 29, 2020 at 11:48
  • Just did that with expression: div(variables('SumDelayedEUR'),variables('NumberDelayedEUR'))
    – zwornik
    Commented Apr 29, 2020 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.