Unable to Filter the View Without Changing Grand Totals

Published: 29 Nov 2016
Last Modified Date: 04 Jan 2019


You are unable to keep the same grand total when filtering the view. 


Tableau Desktop


This example uses Superstore sample data to show the grand total of Sales by State. The below solution can be reviewed in the attached workbook. 
  1. Select Analysis > Create Calculated Field
  2. Name the calculation grandtotal.
  3. Enter the following formula, then click OK:
    IF SIZE() = 1 THEN ATTR({FIXED Country : SUM([Sales])})
    ELSE SUM([Sales])
  4. Place State on Rows 
  5. Place grandtotal on Text
  6. Right-click State and select Show Filter
  7.  Select Analysis > Totals >  Show Column Grand Totals

You can now filter on State, while keeping the grand total the same. To view these steps in action, see the video below:
Note: the video has no sound 

Additional Information

This method can be used to conditionally color the grand totals column as well.

Discuss this article... Feedback Forum
Did this article resolve the issue?