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 / filter and count data ...
Power Apps
Answered

filter and count data by date of the day of a sharepoint column Function (Today) if possible

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hello, How can I filter data from a sahrepoint list by date?

 

I need to count and show in several label, how many are pending and how many are ending based on a sharepoint column called (status)

 

show labels by date, if possible with the "today ()" function

 

It is similar to the template offered by powerapps called (Service Desk)

Captura.PNG

thanks

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    You can count the number of rows for each status by putting this into a label.  My response assumes Status is a Choices data type in SharePoint.

     

    CountRows(Filter(your_datasource_name, Status.Value = "Approved", Created = Today()))

     

     ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi thanks, at the time the date didn't work for me, 
    All data is counted and not by the current day

     

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    I don't understand your comment "all data is counted and not by the current day."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hello, sorry, this is my app,

     


    the gallery shows all the data entered, at the moment (4 records)

    dashboard.PNG

     

    I just want to show the data of the day, for example: the 2 records of day 26

     

    I have a problem with this formula in the part   Created = Today()

    CountRows(Filter(your_datasource_name, Status.Value = "Approved", Created = Today()))

    it makes me wrong

     

     

     

  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    If you try to FILTER a date in SharePoint you will run into delegation issues.  You must create 3 new Number columns in SharePoint createdYear, createdMonth, createdDay.  For new every record that gets created you must populate these values. (e.g. 2/26/2019 becomes createdYear: 2019, createdMonth: 2, createdDay: 26).

     

    Put this code in the OnVisible property

    Set(
     currentDate,
     {
     Year: Year(Today()),
     Month: Month(Today()),
     Day: Day(Today())
     }
    )

     

    Then you use this code to count the rows

    CountRows(
     Filter(
     your_datasource_name,
     Status.Value = "Approved",
     createdYear = currentDate.Year,
     createdMonth = currentDate.Month,
     createdDay = currentDate.Day
     )
    )

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard