COUNTD Invalid in Published Data Sources When Data Blending

Published: 17 Jun 2013
Last Modified Date: 05 Feb 2018


Calculations using the COUNTD function become invalid when the data source is published.


  • Tableau Desktop 8.0 and later
  • Tableau Server 8.0 and later
  • Blended data
  • Published data source


Create a table calculation to mimic COUNTD:
  1. In Tableau Desktop, open the worksheet with the invalid field. 
  2. Select Analysis > Create Calculated Field.
  3. In the Calculated Field dialog box, do the following and then click OK:
    • Name the calculated field. In this example, the calculated field is named Manual COUNTD.
    • In the formula field, create a calculated field similar to the following:
  4. In the view, replace the invalid field with Manual COUNTD.
  5. Drag the dimension used in the original COUNTD calculation to Detail.
  6. In the view, right-click Manual COUNTD, and then select Edit Table Calculation.
  7. In the Table Calculation dialog box, for Compute using, select the dimension used in the original COUNTD calculation, and then click OK.
Note: This calculation will not work if Measure Values is in the view.


Tableau uses temporary tables to perform non-additive aggregations, such as COUNTD, MEDIAN, and RAWSQLAGG in blended data.
  • In version 8.0 of Tableau Server and Tableau Desktop, temporary tables were not available for published data sources.
  • Temporary tables for published data sources are available from versions 9.0 of Tableau Server. Non-Additive aggregations will function with published data sources as long as the published data source is the primary. For more information, please see "whats new in Tableau Server" under 'Faster Performance'.
Did this article resolve the issue?