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 / Count the number of re...
Power Apps
Unanswered

Count the number of records(Items) has recorded between selected date.

(0) ShareShare
ReportReport
Posted on by 111

Hi Mates,

I want to count the number of items in between selected dates from a SharePoint list. I have Created On date and time field standard date and time format. 

I have tried with datepickers with below formula

CountIf('EUTSTSTS','Created On' >= DatePicker2_1.SelectedDate && 'Created On' <= DatePicker3_1.SelectedDate)

but it was not showing true count. please refer below screen for your idea.Date.png

Please help me to resolve it. Thanks!

Categories:
I have the same question (0)
  • Merlijn Profile Picture
    128 on at

    You can try to use the Count around a filtered source. So you filter your datasource on the start-end date/time, and you count these rows.

     

    CountRows(FilteredSource)

    Set this code in the Text-property of a label, and you see the number of rows. 

  • ShaikSayyad Profile Picture
    111 on at

    I had tried with below formula

    CountRows(Filter('EUSTSTS','Created On'>= DatePicker2_1.SelectedDate && 'Created On' < DatePicker3_1.SelectedDate))

    But same thing happened again. It was showing wrong count only

  • Merlijn Profile Picture
    128 on at

    You can also set the formula in a Datatable, this way you see your filtered source. This way you can analyze, and edit your formula until you have the expected result.

     

    If you need more help, please share some screenshots of the issue.. 

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

    Hi @ShaikSayyad 

     

    Could you please check whether your  PowerApp and the SP has the same time zone?

    If not,please set them to same and then test again.

     

    More information:

    function-dateadd-datediff

     

    Best Regards.

    Yumia

  • Milansinh Raj Profile Picture
    149 on at

    Hello @ShaikSayyad ,

     

    Actually whatever condition you are using with ">=" or "<=" or "<" or ">" - this are delegable functions, using this data can be vary, it wont show you always the correct result.

    You could see there, the function you have written there should be blue line and it will show you message of delegation.

    Below is link for delegable function and more details:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

     

    For getting exact count of records you need to find a way which is not using any of the delegable functions/operators.

     

    Thanks,

    Milansinh Raj

  • ShaikSayyad Profile Picture
    111 on at

    See I'm not getting any delegable errors in my formula,please have a look into the below screen you would get what was the my issue.App screenApp screen

     

    SharePoint ListSharePoint List

    Actually the true count was 74 in between selected dates but it was showing 54 only.

    for your information my SP list has date and time format.

  • Milansinh Raj Profile Picture
    149 on at
    CountRows(Filter('EUSTSTS',DateValue(Text('Created On'))>= DatePicker2_1.SelectedDate && DateValue(Text('Created On')) < DatePicker3_1.SelectedDate))

    As you said SP list have Date Time format, we have converted 'Created on' field to Date and then compared.

    let me know after trying this formula.

     

    CountRows(Filter('EUSTSTS',DateValue(Text('Created On'))>= DatePicker2_1.SelectedDate && DateValue(Text('Created On')) < DatePicker3_1.SelectedDate))

     

  • ShaikSayyad Profile Picture
    111 on at

    Dt2.png

    Not woring, I got the same result 54  items only.

  • Milansinh Raj Profile Picture
    149 on at

    can you display value on Text label of Selected dates ? So I can see what its taking from Date Control ?

  • ShaikSayyad Profile Picture
    111 on at
    you can see the value of the label that is 54 (Selected label- showing value after selected dates only) in the above provided picture.

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

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard