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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,554)