Showing Any Calculation in Column or Row and Grand Total

Published: 25 Jul 2016
Last Modified Date: 13 Nov 2017


How to show any calculation in Column or Row view and Grand Total field.


Tableau Desktop 9.0.1


The following instructions can be reviewed in the attached workbook.
Use a calculation similar to the following to display the percent of total per customer in the view and calculate the percent of total sales for the entire data set in grand totals.
IF SIZE() = 1
THEN <calculation shown in Grand Total field>
ELSE <calculation shown in view>

In this example, SIZE() is used to define the number of rows in each partition. In this case, IF SIZE() = 1 is saying that if the partition is 1 (Grand Total is one row) THEN return our calculation we want to show in Grand Total. ELSE (if the partition or rows are anything other than 1) returns our calculation to show in the view.
Did this article resolve the issue?