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 / Group By Month and cou...
Power Apps
Unanswered

Group By Month and count the number of items per month

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a SP list where is stored a security table
with info like
Date, Name, Employee Number, Grade of Risk, Type of Risk etc

The problem is that the list is over 2000 records

How can I group the items by Month (Date) and the type of risk

Categories:
I have the same question (0)
  • Krishna92 Profile Picture
    Microsoft Employee on at

    @Anonymous 

     

    You can store the information as a group by using the GroupBy function.

    Using this you can group the information onto a specific column.

     

    Please check the documentation for more insights regarding the GroupBy function.

     

    Also, you can check out the video by one of our MVP's regarding the same.

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Because Groupby is not a delegable function, once the number of records exceeds 2000, then an error will definitely occur.

    In addition,The date field is also not delegateable, you also need a separate field "month".

    I have an alternative for your reference:

    I assume you have added a number field "Month" into the SP list:

     

     

    ForAll(
     Table(
     {themonth: 1},
     {themonth: 2},
     {themonth: 3},
     {themonth: 4},
     {themonth: 5},
     {themonth: 6},
     {themonth: 7},
     {themonth: 8},
     {themonth: 9},
     {themonth: 10},
     {themonth: 11},
     {themonth: 12}
     ),
     ForAll(
     Table(
     {therisk: "Risk1"},
     {therisk: "Risk2"},
     {therisk: "Risk3"}
     ), 
     Collect(
     thecollection, /*thecollection is my custom collection*/
     {
     Month: themonth,
     Risk: therisk,
     group: Filter(
     YourSPlist,
     Month = themonth,
     Risk=therisk 
     )
     }
     )
     )
    )

     

     

    I created a table using hard coding, and then traversed the table to create a new collection

    Best Regards,

    Bof

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard