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 / Count Group By Table
Power Apps
Answered

Count Group By Table

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

I have a sharepoint list from which I need to create a table that looks like the one below. The problem is that both Category and Nominees are tables. Category is a multiple choice column on sharepoint so it is listed as table while Nominees are person column that can contain even multiple people for each category. What I need to do is a table that counts how many projects for each category (Unique or distinct) and then how many nominees for each Category. Problem I am encountering is that those are tables inside tables inside tables (nested tables). Thanks a lot for your help. 

 

ViTko_0-1645197972484.png

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ViTko 

    Can you explain more about how it is that you have a SharePoint list that has nested tables in it?

    If that is not what you meant, then can you provide the formula you are using to group your data?

  • ViTko Profile Picture
    8 on at

    Well, I dont know if they are nested but I have problems to do a groupby on the columns that are choice ones on Sharepoint. Thanks a lot for your help. In this case Category is a choice and Nominee is a person so it contains a lot of information for each record such as email, displayname etc. Thanks a lot for your help.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ViTko 

    So then consider the following to group your data:

    AddColumns(
     GroupBy(
     AddColumns(yourListName,
     "_category", Category.Value
     ),
     "_category", "_records"
     ),
     "_projectCount", CountRows(_records)
    )

     

    The above will give you the categories grouped and the counts for the projects.

     

    As for the nominees, tell me more about that column - I know it is a person column as you have mentioned, but is it multiple-select or single-person?

  • ViTko Profile Picture
    8 on at

    Hi Randy,

     

    This is exactly what I wanted, but I also need to add to it that Nominee column so it counts how many persons are for each project. Nominee column is a "Person or Group" column that allows for multiple selections. 

    Thanks a lot for helping me.

     

    V.

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ViTko 

    Very good.  Then your formula would be:

    AddColumns(
     GroupBy(
     AddColumns(yourListName,
     "_category", Category.Value
     ),
     "_category", "_records"
     ),
     "_projectCount", CountRows(_records),
     "_nomineeCount", Sum(ForAll(_records, {Value: CountRows(Nominee)}), Value)
    )
  • ViTko Profile Picture
    8 on at

    Thanks a lot for your help Randy.

     

    V. 

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard