Datasource : sharepoint List
I would like to display a number of records that having few condition such as :-
1. Pending Request (Total)
2. Records with Active status (total)
current formula for button is :-
CountRows(
Filter(
'Employee',
Status = "Active" && ('Approval Status' = "Approved" || 'Approval Status' = "Pending")
)
)
Question :
1. How can i display records as it will have more than 2000 rows and i need this total to be counted and display on first screen for my application canvas thanks. i am new here
The only way to use CountRows() on more than 2,000 records is to create a collection with all of your required records. One way to do this would be to think of your data in chunks that are less than 2,000 records in size.
For example, if each record has a Date field and a chunk of records for a 6 months period never has more than 2,000 records in it then you could create this 4,000 record collection
// First six months of 2023
ClearCollect( colFirstSixMths, Filter( myData, dateField >= DateValue("01/01/2023") && dateField <= DateValue("06/30/2023") ) );
// Last six months of 2023
ClearCollect( col2ndSixMths, Filter( myData, dateField >= DateValue("07/01/2023") && dateField <= DateValue("12/31/2023") ) );
// Combine collections
ClearCollect( colAllYear, colFirstSixMths, col2ndSixMths)
Change
- myData to the name of your data source, and
- dateField to the name of your Date Field/Column
Hi @Anne98 ,
CountRows is simply not Delegable - you can do this
With(
{
wData:
Filter(
'Employee',
Status = "Active" &&
(
'Approval Status' = "Approved" ||
'Approval Status' = "Pending")
)
)
},
CountRows(wData)
)
or to split it up to maximum of 2,000 each
With(
{
wData1:
Filter(
'Employee',
Status = "Active" &&
'Approval Status' = "Approved"
),
wData2:
Filter(
'Employee',
Status = "Active" &&
'Approval Status' = "Pending"
)
},
CountRows(wData1) + CountRows(wData2)
)
but that is the best you will do without getting involved in a big collection (refer this blog of mine)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
What is the datasource for these items?
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2