Error "Tableau Data Engine Error: 40401: Scan::Next: Mismatched row counts" Opening Workbook Connected to Data Extract

Published: 17 May 2016
Last Modified Date: 17 Jul 2017


When opening a workbook connected to an extract containing a field created in Tableau Desktop, such as a group, the following error might occur:

An error occurred while communicating with data source '<Data source name>'. Tableau Data Engine Error: 40401: Scan::Next: Mismatched row counts: Table has ____ rows: Column: [<field name>] has ____ rows



Tableau Desktop 9.3.0 - 9.3.5


Option 1

Upgrade to Tableau Desktop 9.3.6. For more information, see Upgrade Tableau Desktop.

Option 2

  1. Open a workbook connected to the affected extract file.
  2. Navigate to a sheet in the dashboard to prompt the "Extract Not Found" dialogue.
  3. Locate the affected extract locally.
  4. Navigate to an affected sheet to encounter the error.
  5. Dismiss error by pressing OK.
  6. Right-click the grouped or other Tableau-generated field that is mentioned in the error message to edit the group or field.
  7. Make any change (e.g., move Null value from one group to another).
  8. Click OK.
  9. Viz loads without error.
  10. Change the group or problem field back.
  11. Right-click the Data Source > Extract > Optimize.
  12. Save and close.

Option 3

Use extract filters.
  1. Remove data source filters (especially for fields that constitute ad-hoc groups):
    1. Right-click the extract in Tableau Desktop and select Edit data source filters….
    2. Make note of all the filters to replicate them with extract filters later.
    3. Click each data source filter and select Remove.
    4. Click OK.
  2. Replace the data source filters removed above with extract filters:
    1. Right-click the extract in Tableau Desktop and select Extract data....
    2. Select Add… and choose the desired field and filter the data.
    3. Repeat for each of the fields that were previously data source filters.


This behavior is related to a known issue which has been corrected.
Did this article resolve the issue?