web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / GroupBy Function Not W...
Power Apps
Answered

GroupBy Function Not Working

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 

I'm having some trouble using the GroupBy function to group some data that I have. For context I have multiple submissions for a step challenge and I want the app to show a total steps leader board based on the data fed to it by the SharePoint list. I've used the following Microsoft article to gather the syntax for this:

 

https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-groupby

 

the code I used is the following:

 

ClearCollect(
SimplifiedSteps,
ShowColumns(
'Walking Month Step Count',
"Full_x0020_Name",
"StepCount",
"ID"
)
);
ClearCollect(
PersonalSteps,
GroupBy(
SimplifiedSteps,
"Full_x0020_Name",
"StepsTaken"
)
);
ClearCollect(
PersStepSum,
AddColumns(
PersonalSteps,
"TotalSteps",
Sum(
"StepsTaken",
"StepCount"
)
)
);

 

SimplifiedSteps gives the following table from the SharePoint list 'Walking Month Step Count':

 

powerappscap1.PNG

 

PersonalSteps (grouped by name) gives:

powerappscap2.PNG

 

and so far it has worked to give grouped tables of all the names that are the same with all the attributed step count data:

powerappscap3.PNG

 

however, when I go to do the number aggregation like the article states (last part of the code) I get the following:

powerappscap5.PNG

 

Its driving me crazy as I can see anything wrong with my syntax ( Sum("StepsTaken", "StepCount") ) and I'm 100% sure that the numbers are in number format (its a numbers column on the original list.

 

Can anyone who has done this offer any insight to what my be wrong? going crazy here! 😄

Categories:
I have the same question (0)
  • Verified answer
    Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @Gennaro87 

     

    Pls try with the below formula:

     

    ClearCollect(
    PersStepSum,
    AddColumns(
    PersonalSteps,
    "TotalSteps",
    Sum(
    StepsTaken,
    StepCount
    )
    )
    );

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

    Thanks

  • Gennaro87 Profile Picture
    5 on at

    Of course it was a syntax error, such a stupid mistake on part! thank you so much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard