cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nikola_bgd
Advocate II
Advocate II

Get average from a SP list

Hey all, 

 

I'm trying to figure how to get an average value from a SharePoint list.

 

The list looks something like: 

 

ID Grade

1     4

2     5

3     3

4     2

 

I will than use the average to send an email. (this part is easy 🙂 )

 

Any ideas?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @nikola_bgd,

Do you want to get the average value of the Grade column?

 

Here is the flow you should configure to achieve your need:

vqiaqimsft_4-1649912902878.png

vqiaqimsft_2-1649912774852.png

length(outputs('Get_items')?['body/value'])

vqiaqimsft_3-1649912794390.png

add(items('Apply_to_each')['Score'],variables('Total'))
div(variables('Total'), outputs('Compose'))

vqiaqimsft_0-1649912705026.png

 

Best Regards,
Qi

View solution in original post

3 REPLIES 3
okeks
Super User
Super User

Basic: Do a loop over all items, sum them up and at the end divide by the number of items.

 

The "modern" way: https://youtu.be/qsIn0mytC_8?t=289

v-qiaqi-msft
Community Support
Community Support

Hi @nikola_bgd,

Do you want to get the average value of the Grade column?

 

Here is the flow you should configure to achieve your need:

vqiaqimsft_4-1649912902878.png

vqiaqimsft_2-1649912774852.png

length(outputs('Get_items')?['body/value'])

vqiaqimsft_3-1649912794390.png

add(items('Apply_to_each')['Score'],variables('Total'))
div(variables('Total'), outputs('Compose'))

vqiaqimsft_0-1649912705026.png

 

Best Regards,
Qi

Hi Qi,

 

Thx!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,810)