cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver III
Resolver III

Calculate SP list average using filter?

I am trying to calculate the average value of a choice (single) column in a SharePoint list where a different choice (single) column is equal to a certain value (Get average Hours for employees in Chicago). In the OnStart of my app, I am binding my list to a collection:

ClearCollect(RecordsCollection, Employees)

This is the only formula I've gotten to work with no errors, however the value is incorrect (displays ~3000, should be <2)

Average(Filter(RecordsCollection, 'Chicago' = Region.Value), Hours.Value)

Hours is the choice column that I'd like to get the average of. I'm not finding a ton of forums on Average, does anyone see problems with this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver III
Resolver III

Re: Calculate SP list average using filter?

The forumla above was correct. However once I changed the width of the label I was displaying this on to make it wider, the correct value appeared

View solution in original post

2 REPLIES 2
Highlighted
Resolver III
Resolver III

Re: Calculate SP list average using filter?

The forumla above was correct. However once I changed the width of the label I was displaying this on to make it wider, the correct value appeared

View solution in original post

Highlighted
New Member

Re: Calculate SP list average using filter?

Wow, how could this have solved the problem?

I had the same problem, but with a grouped collection showing in a gallery in which I had put a label with the value

Average(<groupname>,Min(value1, value2))

The group consisted of 7 records and the values ranged from 0 to 4 so the result should have been a decimal number somewhere between those values but the label was showing 527 or something around that.
I could not figure out why.

Then I saw this post and when I just resized the label it started showing the correct decimal value instead.

 

Incredibly weird.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,478)