cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JonasH
Helper II
Helper II

How to CountRows large datasets (2000+)

Hey, 

I want to count rows of a SQL-Table, but SQL is marked with a delegation warning.

I increased the data row limit for non-delegable queries to 2000 (max).

Unfortunately my table has more than 2000 records.

If I display the table as a gallery and count the rows of the gallery, I have to scroll to the bottom of the gallery.

 

Thanks for your help.

1 REPLY 1
timl
Super User III
Super User III

Hi @JonasH 

Unfortunately, it's not possible to retrieve an accurate record count from within PowerApps due to the 2000 row limit.

If you want a straight count of the records in your table, one way to work around this is to use a SQL Server View.

You can create a view in SQL Server that looks like this:

 

 

CREATE VIEW vwTableCount
AS
SELECT COUNT(*) AS [RowCount]
FROM
dbo.MyTable

In your app, you can add this View as a datasource. In the label where you want to display the count, you can use the following formula:

First(vwTableCount).RowCount

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (25,668)