KNOWLEDGE BASE

Creating a Single Label for a Custom Region


Published: 08 Apr 2015
Last Modified Date: 21 Jun 2016

Question

How to display a single label for an entire group in a custom region, when creating a map based on groups of states.

Environment

Tableau Desktop

Answer

The following instructions use the Sample - Superstore data source.

Step 1: Calculate the sales per region using a Fixed Level of Detail calculation

  1. Select Analysis > Create calculated field.
  2. Name the calculated field "Sales by Region" and enter the following formula:
    { FIXED [Region]: SUM([Sales])}

Step 2: Create a calculated field to eliminate Duplicate Labels

  1. Select Analysis > Create calculated field.
  2. Name the calculated field "Label Text" and enter the following formula:
    IF INDEX() = 1 
    THEN MAX([Sales by Region]) 
    END 

Step 3: Build the view

  1. Double-click the "State" dimension.
  2. Drag "Region" to Color on the Marks card.
  3. Drag "Label Text" to Label on the Marks card.
  4. Right-click on the Label Text field and select Compute Using > State.
Did this article resolve the issue?