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 / How to count records w...
Power Apps
Answered

How to count records within the current year?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to see how many records each person has entered for the current year from a sharepoint list. Here is what I have below:

 

"Current Year Count for " & User().FullName & ": " & CountRows( Filter(
Collection1,
Created >= Date(Year(Today()), Year(Today()), 1),
Created < Date(Year(Today()), 1 + Year(Today()), 1), IsMatch( 'Created By'.Email, User().Email)))

 

Please Help! Thank you 

Categories:
  • jhall Profile Picture
    636 on at

    Weeeelll...copying/pasting your calculation:

    Date(Year(Today()), Year(Today()), 1)

    ...into a label gives:

    3/1/2187

    ...so maybe start there.  Smiley LOL

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    You just need to use Year(Created), then it will return the created year.

    Try this formula:

    "Current Year Count for " & User().FullName & ": " & CountRows( Filter(Collection1,Year(Created)=Year(Today())))

     

    Best regards,

    Community Support Team _ Phoebe Liu

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Wow, this method is so much more effective. Thank you! 

     

    Here's what I came up with!

     

    CountRows( Filter(
    Collection1,
    Created >= Date(Year(Today()), 1, 1),
    Created < Date(Year(Today()), 12, 31), IsMatch( 'Created By'.Email, User().Email)))

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yutliu-msft wrote:

    Hi @Anonymous ,

    You just need to use Year(Created), then it will return the created year.

    Try this formula:

    "Current Year Count for " & User().FullName & ": " & CountRows( Filter(Collection1,Year(Created)=Year(Today())))

     

    Best regards,

    Community Support Team _ Phoebe Liu


    Will this also work on a table. I have grouped my data by the creator and then I want to count how many each user can submitted how many entries for the year. I have made a gallery to put these two columns in. 

     

    GroupBy(AddColumns(Collection1, "UserDisplayName", 'Created By'.DisplayName), "UserDisplayName", "GroupByUsersDisplayName")

     

    CountRows( Filter(GroupByUsersDisplayName,Year(Created)=Year(Today())))

     

    It seems like it is working, but I just want to make sure. 

  • jhall Profile Picture
    636 on at

    Yes, this will work on a Table (i.e. Collection).  PowerApps essentially treats (for the most part) any complex data type that groups fields together into a Collection and any of the functions you see that do operations on data sources are treating those sources as Collections as well.

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 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard