# How to Customize Totals to Show Different Values Than Table

Today prepare for the next tutorial signed btProvider, where we will teach you how to customize totals to show different values than the main table of the view. For this, you can use the function SIZE () to differentiate between different parts of the view in a calculation. For example, showing a different measure or returning a Percent of Total in the Grand Totals while showing SUM([Sales]) in the view.

Are you ready to start? Follow the next instructions, step by step:

#### Step 1: Connect to data

→ In Tableau Desktop, connect to Sample – Superstore sample data provided by Tableau.

#### Step 2: Option 1: Showing a different measure

→ Create Calculated Field called “Custom GT”:

IF Size() > 1

THEN MAX([Profit])

ELSE SUM([Sales])

END

→ Place the calculated field [Custom GT] in the view

→ Right-click the calculated field [Custom GT] and select Edit Table Calculation… and select Pane (across and then down).

#### Step 3: Option 2: Showing a table calculation, such as percent of total

Create Calculated Field called “Size” using the following formula:

SIZE ()

Create Calculated Field called “Custom GT 2” using the following formula:

IF [Size] > 1

THEN SUM(Sales)

ELSE SUM(Sales)/TOTAL(SUM(Sales))

END

→ Build the view with the desired dimensions.

→ Place the calculated field [Custom GT 2] in the view.

→ Right-click on [Custom GT 2] in the Marks card and select Edit Table Calculation…

→ In the Table Calculation dialogue, set the Nested Calculations to [Size]

→ Under Compute Using choose Pane (across and then down) and click OK.

→ Right-click on [Custom GT 2] in the Marks card and select Format…

→ In the left-hand Format pane, Under Totals, in the Numbers dropdown, select Percentage

If you like video tutorials, we recorded for you the entire process as you can see in the #skillpill video below, created by our colleague Andreea Chiriac, Data Analyst.

As Tableau Software Premier Partner we are continuously advising and supporting our customers in using Tableau on a daily basis. This means analysing the data and understanding its evolution through creative and insightful dashboards. Our team of Data Analysts are qualified to explain and guide the company’s internal data teams in the journey to become more data-driven.

We hold the technical and sales certifications for all products: Tableau Desktop, Tableau Server, Tableau Prep, Tableau Data Management.

With Tableau Software you can always understand your business or your job better. Using Tableau, you will take smart and strategic decisions and you will quickly understand the data flow, numbers and results it produces.

Are you interested in learning more about Tableau or implement the solution in the entire company? Contact us!