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 / CountRows is returning...
Power Apps
Unanswered

CountRows is returning a delegation error

(0) ShareShare
ReportReport
Posted on by 3,514

I have the following formula, but it is raising a delegation error:-

 

rowcounts.png

 

is there a way to fix this?

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @johnjohn123 

    Short answer, No. CountRows isn't delegable. You can make the visibility of the error go away by using a With() statement but that won't change what data the formula returns/acts on.

     

    To fix, you can create a collection of your data then apply the formula to that. Bear in mind that if you need more than 2000 records you will need to apply some extra code

  • johnjohn123 Profile Picture
    3,514 on at

    @Anonymouswe already has 8,000 items inside the Activities SharePoint list and 1000 records inside the Project list.. so how we can fix this issue? what i am trying to do is to get the number of activities that are related to the Project and has the status = completed then divide the number by the total number of of activities under the project.. so how i can achieve this then?

     

    in short i have 2 SharePoint lists; Project Master & Activities. the Activities has a lookup field to the Project list named ProjectTitle, as follow:-

    title.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @johnjohn123 

     

    It seems you are filtering on 1 Project number only, is this correct? If so, and you know that there will NEVER be more than 2000 activities / Project then you could just do something like this

     

    With(
     {
     wCompleted: Filter(Activities, ProjectTitle.Value=varProjectdetails.Title, Status.Value = "Completed"),
     wAll: Filter(Activities, ProjectTitle.Value=varProjectdetails.Title)
     },
    
     CountRows(wCompleted) / CountRows(wAll) // add your formatting here
    )

    You can add your formatting where I've indicated - I was just lazy and didn't do it lol

     

    This will remove the delegation error but be aware that this formula will only ever bring back a maximum of 2000  records each for wCompleted and wAll. 

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

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard