web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Suggested answer

Unable to count rows of a table view

(1) ShareShare
ReportReport
Posted on by Microsoft Employee
If anyone done this successfully without getting delegation error in PowerApps, kindly share your code.
 
thank you :)
Categories:
I have the same question (0)
  • Ram Prakash Profile Picture
    5,511 Super User 2025 Season 2 on at
    Unable to count rows of a table view
     
    You can use below query to achieve the same 

    CountRows(Filter(TABLENAME, Status = "Active"))

    if you want in views then you can try

    ClearCollect(colRecords, 'My View');
    CountRows(colRecords);

    Please mark as answer if my suggestion helps.
    Subscribe here for More Useful videos : https://www.youtube.com/@rampprakash3991
     
  • Suggested answer
    Daniel Bocklandt Profile Picture
    4,894 Super User 2025 Season 2 on at
    Unable to count rows of a table view
    Hey ManishM,
     
    CountRows is Delegable of you use it in Dataverse as you can see in the doc here.
     
    So if you're getting a delegation warning you're either not using Dataverse or there is another part of the formula that is not Delegable. Sometimes the warning doesn't display at the right place. could you send us the function that you are using?
     

    If this solved your problem, please mark it as Solved to help others find the solution faster.
    If you found it helpful, consider giving it a Like to support each other in this community!

    Thanks, and happy building!

  • ManishM Profile Picture
    Microsoft Employee on at
    Unable to count rows of a table view
    Thank you @Daniel Bocklandt and @Ram Prakash for your response.
     
    I understand I can apply in-PowerApp expressions to count but I want to minimize server requests to enhance performance. I simply want to count rows of a View since the View is filtered outside the app.
     
    Below is what I am using for now which is giving me delegation warning:
     
     
    What I am looking for a very simple approach that I can imagine like:
     
    CountRows('table (views)'.viewName)
     
    But I, probably, am using incorrect syntax hence looking for experts' help. If there is no other way than the one with the delegation warning, so be it.
     
    Thank you for your help
  • WarrenBelz Profile Picture
    151,446 Most Valuable Professional on at
    Unable to count rows of a table view
    This is probably not the option you want based on your later comments, but assuming the row numbers are under your Data Row Limit, you can do this
    With(
       {
          _Data:
          Filter(
             MSAVC_ApprovedDeviatedDevices,
             'MSAVC_ApprovedDeviatedOevices(Views)'.mm_ÂllApprovedDevices_PendingSupplierData
          )
       },
       CountRows(_Data)
    )
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn  
  • ManishM Profile Picture
    Microsoft Employee on at
    Unable to count rows of a table view
    Thank you @WarrenBelz 
     
    I wanted to avoid any addition processing other than simply fetching the View record count from the server.
  • WarrenBelz Profile Picture
    151,446 Most Valuable Professional on at
    Unable to count rows of a table view
    You did not mention your data source - if SharePoint, you cannot have Delegation with CountRows. If Dataverse, there is some limited capacity, but it is not Delegable with SQL.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

Last 30 days Overall leaderboard

Featured topics