cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User
Super User

Re: How to CountRows large datasets (2000+)

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,500)