cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Canadiansal
Helper V
Helper V

Sum

I have a list that has a Category Field and a Count Field

There will be 5 Categories in the List.

I will like to create a Summary Screen in the APP, where the Count of Each Category is Displayed.

So:

Cat1: Total

Cat2: Total -etc.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Canadiansal,

Based on the issue that you mentioned, do you want to sum the scores of each grouped team?

Could you please share a bit more about the scenario?

I have a test on my side, please take a try as below.

In my scenario, I have the SPList1 as my data source, a Choice column Team and a Number column YourPts.

Add a Gallery and set the Items property as below:

AddColumns(
    GroupBy(
        AddColumns(
            SPList1,
            "NTeam",
            Team.Value
        ),
        "NTeam",
        "GTeam"
    ),
    "SumPts",
    Sum(
        ForAll(
            GTeam.YourPts,
            YourPts
        ),
        Value
    )
)

Set the Text property of the Labels within the Gallery as below:

ThisItem.SumPts

v-qiaqi-msft_0-1623296674515.png

Regards,

Qi

 

Best Regards,
Qi

View solution in original post

5 REPLIES 5
eka24
Super User
Super User

Insert a Gallery and on the Items Property put:

 

AddColumns(GroupBy(MyList,"CategoryField","GroupedColumn"),"CountColumn",CountRows(GroupedColumn))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Consider Checking My Youtube Channel

 

Canadiansal
Helper V
Helper V

Does not work 

AddColumns(GroupBy(Compete,"Team","YourPts"),"CountFunction",CountRows(YourPts))

eka24
Super User
Super User

Is complete the name of your Table and Team the name of tour column?

If you have errors can you show a screen shot?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Consider Checking My Youtube Channel

Thanks. Here is the Table. Team is a Choice Column. And YourPts is a Numerical score.

I am trying to create a leaderboard which will show the Points grouped by Team,

Canadiansal_0-1623101032642.png

 

Hi @Canadiansal,

Based on the issue that you mentioned, do you want to sum the scores of each grouped team?

Could you please share a bit more about the scenario?

I have a test on my side, please take a try as below.

In my scenario, I have the SPList1 as my data source, a Choice column Team and a Number column YourPts.

Add a Gallery and set the Items property as below:

AddColumns(
    GroupBy(
        AddColumns(
            SPList1,
            "NTeam",
            Team.Value
        ),
        "NTeam",
        "GTeam"
    ),
    "SumPts",
    Sum(
        ForAll(
            GTeam.YourPts,
            YourPts
        ),
        Value
    )
)

Set the Text property of the Labels within the Gallery as below:

ThisItem.SumPts

v-qiaqi-msft_0-1623296674515.png

Regards,

Qi

 

Best Regards,
Qi

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.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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,496)