cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marney
Helper II
Helper II

GroupBy Person Column and Sum

Greetings All!

Hoping to get some help...I have a SP List below:

marney_0-1649418517827.png

Member is a Person column.

There will be multiple entries per Member (it's a walking tracker app so users will log in daily and submit their steps).

I would like to group the entires by Member and get the sum of all the "Steps" column per Member.

Thanks so much in advance 🙂

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@marney 

You will not be able to group on a complex column (the person column), so you will need to pull a simple column out of it to group on.

Ex:  

AddColumns(
    GroupBy(
        AddColumns(yourDataSource,
            "_member", Member.Email
        ),
        "_member", "_records"
    ),
    "_steps", Sum(_records, Steps)
)

 

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@marney 

You will not be able to group on a complex column (the person column), so you will need to pull a simple column out of it to group on.

Ex:  

AddColumns(
    GroupBy(
        AddColumns(yourDataSource,
            "_member", Member.Email
        ),
        "_member", "_records"
    ),
    "_steps", Sum(_records, Steps)
)

 

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
marney
Helper II
Helper II

ah Randy...that was more than helpful, it was a life saver! Thank you so much!!

I'm sorry to trouble you as I saw you helped someone else with another issue that I am suddenly experiencing.

On Success of my Form, I perform a ForAll patch to a "child" list using LastSubmit of the form (i.e {Title:formname.LastSubmit.Title, ID=formname.LastSubmit.ID) etc.

All of a sudden, it's starting to give me error "Title:Field Title is required".

I restored a previous version and the Submit was working fine so I continued to build that up, now all of a sudden, its also doing the same thing!!

Any clue you could give me would be hugely appreciated..done the usual, save, publish, close, created a new collection, new child list in SP).

Thanks again,

marney

marney
Helper II
Helper II

Ignore the above please Randy...on my Submit, I was performing a Reset and New Form; cleared that out and all is working again 🙂

Thanks again for your help mate.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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