0
0
Tableaubi_tool~8 mins

String functions (LEFT, RIGHT, CONTAINS) in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - String functions (LEFT, RIGHT, CONTAINS)
Dashboard Goal

Understand how to use string functions LEFT, RIGHT, and CONTAINS in Tableau to analyze customer data by extracting parts of text and checking for keywords.

Sample Data
Customer IDFull NameEmailRegion
101Anna Smithanna.smith@example.comNorth
102Bob Johnsonbob.j@example.comSouth
103Clara Leeclara.lee@example.comEast
104David Kimdkim@example.comWest
105Eva Browneva.brown@example.comNorth
Dashboard Components
  • KPI Card: First Name Extracted
    Formula: LEFT([Full Name], FIND([Full Name], ' ') - 1)
    Shows the first name part from the full name.
    Example: 'Anna Smith' -> 'Anna'
  • KPI Card: Email Domain
    Formula: RIGHT([Email], LEN([Email]) - FIND([Email], '@'))
    Extracts the domain part of the email after '@'.
    Example: 'anna.smith@example.com' -> 'example.com'
  • Bar Chart: Count of Customers with 'example.com' Email Domain
    Formula for filter: CONTAINS([Email], 'example.com')
    Shows how many customers have emails containing 'example.com'.
  • Table: Customer Details with Extracted Names and Email Domains
    Columns: Customer ID, Full Name, First Name (LEFT), Email Domain (RIGHT), Region, Email Contains 'example.com' (CONTAINS)
    Helps see all string function results side by side.
Dashboard Layout
+----------------------+----------------------+----------------------+
|  First Name Extracted |   Email Domain       |  Email Domain Count  |
|      (KPI Card)       |     (KPI Card)       |    (Bar Chart)       |
+----------------------+----------------------+----------------------+
|                      Customer Details Table                      |
|                      (with all string function columns)         |
+-----------------------------------------------------------------+
Interactivity

Applying a filter on Region updates all components to show data only for that region. For example, selecting 'North' filters the table, KPI cards, and bar chart to customers from North region.

Clicking on the bar chart segment for 'example.com' emails filters the table and KPI cards to only customers whose emails contain 'example.com'.

Self Check

If you add a filter for Region = East, which components update and what data do they show?

  • The KPI cards update to show first names and email domains only for customers in East region.
  • The bar chart updates to count only customers in East region with emails containing 'example.com'.
  • The table updates to show only customers from East region with all string function columns.
Key Result
Dashboard demonstrating LEFT, RIGHT, and CONTAINS string functions in Tableau to extract and analyze customer name and email data.