The overall record count doesn't match the displayed content in a model-driven app
This article provides troubleshooting methods for an issue where the overall record count doesn't match the displayed content in a Power Apps model-driven app.
Symptoms
A typical example of this issue is that the number of records displayed is lower than the count displayed at the bottom of the page.
Cause
The most likely reason is that the data displayed in the grid contains duplicate records (by the value in the primary field). The issue is caused by pulling related record duplicates from the same table.
Troubleshooting checklist
Use the Power Apps Monitor tool to check the total number of records.
If the
recordsCount
matches the total number of records displayed at the bottom of the grid, but the data in the grid has fewer records, it's a strong indication that the data contains duplicate records. Use the monitoring tool to get the currentviewFetchXML
request.The issue can be solved by adding
distinct="true"
to the fetchXML query. For more information, see Query data using FetchXml.If adding
distinct="true"
doesn't solve the problem, consider changing the query to avoid pulling duplicate records. The primary column (field) can also be found by using the Power Apps Monitor tool.