cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Daniel_Work
New Member

Display Count of Records Submitted Today

Hi all, 

 

I am trying to create an app where it submits daily inspection records. However, I am not able to display the Count of records submitted Today. 

 

Formula used =CountIf('Sharepoint List', Text(Status) = "Pass", IsToday(Created))

 

The count value of this formula returns 0. Attached screenshot as reference. 

 

Note = my Sharepoint list consists of more than 2000 lines and adding >600 lines per day

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @Daniel_Work ,

CountIf() and IsToday() are not Delegable, however you could do this as you are after the newest records

With(
   {
      wList:
      Sort(
         SharePointList,
         ID,
         Descending
      )
   },
   CountRows(
      Filter(
         wList,
         Status = "Pass" &&
         IsToday(Created)
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
JR-BejeweledOne
Super User
Super User

Try this:

 

CountRows(
   Filter('Sharepoint List', Text(Status) = "Pass", IsToday(Created)
  )
)


If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
WarrenBelz
Super User III
Super User III

Hi @Daniel_Work ,

CountIf() and IsToday() are not Delegable, however you could do this as you are after the newest records

With(
   {
      wList:
      Sort(
         SharePointList,
         ID,
         Descending
      )
   },
   CountRows(
      Filter(
         wList,
         Status = "Pass" &&
         IsToday(Created)
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Formula still returns 0: 

 

PowerApp Error (Suggestion 1).jpg

PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @Daniel_Work ,

 

Try the below code if it helps.

 

Count(Filter('Sharepoint List',Text(Status) = "Pass" && IsToday(Created)).ID)

Thank you! Seems like its working right now! Do you mind to further elaborate wList and "CountIf() and IsToday() are not Delegable"? 

Hi @Daniel_Work ,

Delegation is a subject you need to understand before you go too far in Power Apps - I have a blog on it that may be useful to you.

Also the With() statement simply creates a (very) temporary variable (in this case a Table I called wList - you can call it whatever you want - of the newest records up to your Delegation limit) so the rest of your code works on this Table  (and is executed "locally" and not subject to SharePoint Delegation restrictions).

I also have a blog on this.

Put quite simply, the maximum record set can be filtered with a non-delegable statement is standard 500 and able to be increased to a maximum of 2,000. Any query on a list over this size must be completely Delegable to return the required result.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,097)