logo
search
Others

How to Fix Power BI CountRows Showing Incorrect Row Count

WPS EditorWPS Editor Sep 27, 2026 868 views

Question details

The user needs to resolve an issue in Power BI where the CountRows DAX calculation fails to update properly after new data has been uploaded and refreshed.

How to Fix Power BI CountRows Showing Incorrect Row Count
Product
Power BI
Device & OS
not provided
Scenario
Updating and refreshing a dataset in a Power BI report to reflect newly added data.
Observed behavior
The CountRows calculation continues to display the old total number of rows instead of updating to reflect the newly uploaded data.
Before you start

Before deleting any tables, save a backup copy of your current Power BI Desktop file (.pbix) and ensure you have the correct file path or credentials to reconnect to your data source.

Solution 1Recommended

Delete and Re-upload the Data Source

The most effective way to force Power BI to recognize the new row count is to completely remove the problematic table from the data model and reconnect to it.

In some instances, Power BI caches the metadata of your dataset. A standard refresh may pull the new data into the query editor, but the data model might fail to update the structural row count, causing DAX measures like CountRows to return stale numbers.

1
Locate the Data Source

Open your Power BI report, navigate to the 'Data' pane on the right side of the interface, and locate the specific table that is showing the incorrect row count.

2
Delete the Table

Right-click the table name and select 'Delete from model' from the context menu. Click 'Yes' or 'Confirm' when prompted.

3
Reconnect to the Data

Go to the Home ribbon, click on the 'Get Data' icon, select your original data source type (e.g., Excel workbook, SQL Server), and import the updated dataset.

4
Verify the Row Count

Once the data finishes loading, check your card visual or table displaying the CountRows measure. The calculation should now display the accurate, updated number of rows.

Delete and Re-upload the Data Source
Visual Restoration: As long as you re-upload the table with the exact same name and column headers, any visuals that temporarily broke during deletion will automatically restore themselves.
Free Microsoft Office alternative

Manage Your Data Seamlessly with WPS Office

If you frequently struggle with complex data analysis tool caching issues, WPS Spreadsheet offers a lightweight and highly compatible alternative. Handle large datasets, perform accurate row counts instantly, and build pivot tables effortlessly without the steep learning curve.

  1. 1. Download and Install: Download WPS Office for free from the official website and follow the simple installation prompts.
  2. 2. Open Your Dataset: Launch WPS Spreadsheet and open your existing .xlsx or .csv data file.
  3. 3. Analyze Easily: Use the built-in ROWS function or highlight your data to instantly view accurate row counts in the bottom status bar.
Count rows and analyze datasets instantly with built-in, reliable formulas.Fully compatible with Microsoft Excel formats (.xlsx, .csv) for easy data transfer.Lightweight application that runs smoothly on standard PCs without heavy caching issues.Free, intuitive interface perfect for quick data visualization and reporting.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power BI not update the row count after a normal refresh?

Power BI may cache old data metadata to improve performance. Additionally, the refresh might fail silently due to query folding limitations or minor connection errors, causing DAX measures like CountRows to display outdated figures from the cache.

Is there a DAX alternative to the CountRows function?

Yes. You can use COUNT(Table[ColumnName]) to count the number of non-blank values in a specific column, or COUNTA for non-empty text values. These column-specific functions can sometimes bypass table-level caching issues.

Will deleting the data source permanently break my existing visuals?

Deleting a table from the model will temporarily break any visuals relying on it. However, when you re-upload the table, as long as it has the exact same table name and column headers, Power BI will map the fields correctly and the visuals will be restored.