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 / Grouping SharePoint li...
Power Apps
Answered

Grouping SharePoint list Items by Month/Year based on Created date

(0) ShareShare
ReportReport
Posted on by 183

I am creating, what I thought would be a quick, gallery for one of our Departments to get snapshots of some of their lists.

Ideally they would like to be able to see how many items have been submitted to multiple lists within a single display. I started off by creating separate collections for each list that gives the list name, records submitted the last 30 and 90 days.

I know they are going to want more of a breakdown from month to month, so I was wondering how to group records for a CountRows based on the month/year something was created.

Here is a sample collection I would need to expand on:

ClearCollect(colBottleWater,{Title:"Bottled Water",All:CountRows('Bottled Water'),ThirtyDays:CountRows(Filter('Bottled Water',Created>=DateAdd(Today(),-30))),NinetyDays:CountRows(Filter('Bottled Water',Created>=DateAdd(Today(),-90)))});

I have a collection for each list as above, and then compile all the collections into a new collection for the Gallery display.

Categories:
  • Verified answer
    Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @NathanFra 

     

    This video will help!  It's pretty much exactly what you described:  https://youtu.be/57ADxeo_13k?t=1266

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @NathanFra,

    Do you want to group records by Month?

    If you want to group records by month, I will help you list all the records in each month this year.

     

    We should add a temporary column to save rthe extracted month of each record and then group them by the extracted month.

    ClearCollect(
     colBottleWater,
     AddColumns(
     GroupBy(
     AddColumns(
     'Bottled Water',
     "Month",
     If(
     Year(Created) = 2023,
     Month(Created)
     )
     ),
     "Month",
     "MonthGroup"
     ),
     "CountForMonth",
     CountRows(MonthGroup)
     )
    )

    CountForMonth column will display the total number of each month.

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard