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 / Delegation on SQL tabl...
Power Apps
Answered

Delegation on SQL table count?

(0) ShareShare
ReportReport
Posted on by 170
I need to count rows from a filtered data table coming from Azure SQL.  However, I get a delegation warning.  I also tried using CountIf (with true) and get the same. Is there a way to do with without delegation?  Thanks.
 
 
EDIT: For now, I am filtering the table into a collection and then doing a count on it.  
Categories:
  • Verified answer
    jrletner Profile Picture
    720 Moderator on at

    Hi @CMSGuy,

    Unfortunately, that is not delegable to SQL.

    However, you have a couple of options.

    1. Write a stored procedure in SQL that accepts the WEDBID as a parameter and returns the count of records matching that condition.

    Call this stored procedure from Power Apps using a custom connector or the SQL connector if available.

    2. Using a collection

    ClearCollect(FilteredCollection, Filter(Financials, WEDBID = SelectedRecord.WEDBID));
    CountRows(FilteredCollection)

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard