cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JonasH
Level: Powered On

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
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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 94 members 5,030 guests
Please welcome our newest community members: