web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard