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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,618)