KNOWLEDGE BASE

Error "Cannot turn on Grand Totals for discrete measures"


Published: 18 Oct 2013
Last Modified Date: 16 Jun 2017

Issue

When you try to turn on grand totals, the following error might occur:
 
Cannot turn on Grand Totals for discrete measures.

Environment

Tableau Desktop

Resolution

Use the following workaround: create a second sheet with only grand totals, and then combine the sheets on a dashboard.
  1. Open the workbook in Tableau Desktop and select Analysis > Create Calculated Field.
  2. In the Calculated Field dialog box that opens, enter a name for the field.
  3. In the formula field, create a calculated field similar to the following, and then click OK:
    WINDOW_SUM([<Field>])
    where <Field> is the field or table calculation used in the view.
  4. Right-click the sheet for which you want to show grand totals, and then select Duplicate.
  5. On the new sheet, replace the original calculated field with the newly created calculated field, and then hide all but the first row of data.
  6. Right-click on the calculated field name on Rows or Columns and clear Show Header.
  7. Combine the crosstab sheet and the total sheet in a dashboard and format as desired.

Cause

Grand totals cannot be used with some discrete measures. All measures from secondary data sources are treated as discrete measures. 

Additional Information

The following rules dictate whether you can turn on grand totals:
  • The view must have at least one header – Headers are displayed whenever you place a dimension on the Columns shelf or the Rows shelf. If column headers are displayed, you can calculate grand totals for columns. If row headers are displayed, you can calculate grand totals for rows.
  • Measures must be aggregated – The aggregation determines the values displayed for the totals. See Grand Totals and Aggregations for more information.
  • Grand Totals cannot be applied to continuous dimensions.
Did this article resolve the issue?