Last Modified Date: 13 Nov 2017
EnvironmentTableau Desktop 9.0.1
AnswerThe 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> END
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.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials