How to Combine 2 Fields in Tableau

Cody Schneider8 min read

Combining two fields in Tableau is one of the most common tasks you'll perform, whether you're creating a clearer location label or a unique ID for your data points. This guide will walk you through a few simple methods for combining fields, from the quick built-in feature to the more flexible calculated field approach. We’ll cover step-by-step instructions and practical examples to get you started.

Why Combine Fields in Tableau?

Before we jump into the "how," let's quickly touch on the "why." Combining fields isn't just a technical exercise, it serves practical business reporting needs. You might combine fields to:

  • Create More Descriptive Labels: A simple "City" field might not be enough. Combining it with a "State" field to create "City, State" labels (e.g., "Austin, TX") provides much clearer context for your charts and maps.
  • Build a Full Name: Raw data often separates first and last names into different columns. Combining [FirstName] and [LastName] into a single [FullName] field is a classic use case for cleaner reports and tooltips.
  • Construct Unique Identifiers (IDs): Sometimes, you need a unique key to identify a record that spans multiple dimensions. For example, combining [OrderID] and [ProductID] could create a unique key for each line item in a sales dataset.
  • Simplify Hierarchies: Instead of having users drill down from category to sub-category, you can create a combined field like "Electronics - Audio" that displays both at once, simplifying the view for certain dashboards.

Whatever your goal, knowing how to merge fields gives you more control over how your data is presented and analyzed.

Method 1: The Quick and Easy “Combine Fields” Feature

Tableau has a handy, built-in feature for combining fields with just a few clicks. This is the fastest way to get the job done, but it offers less flexibility than other methods.

The "Combine Fields" feature works by taking the members of the dimensional fields you select and creating a new field that contains all possible combinations. By default, it uses a comma and a space (", ") as a separator.

Step-by-Step Guide

Let's use the Superstore sample dataset that comes with Tableau. Imagine we want to create a combined field for Category and Sub-Category.

  1. Locate Your Fields: In the Data pane on the left, find the fields you want to combine. In our case, that’s Category and Sub-Category.
  2. Select the Fields: Click on Category, then hold down the Ctrl key (or Cmd on a Mac) and click on Sub-Category. Both fields should now be highlighted.
  3. Create the Combined Field: With both fields selected, right-click on one of them. From the context menu, navigate to CreateCombine Fields.
  4. See Your New Field: Tableau will instantly create a new field in your Data pane named Category & Sub-Category (Combined). You can right-click this new field and rename it to something cleaner if you like, such as "Product Hierarchy."

Using the Combined Field

Now, you can drag this new combined field into your view just like any other dimension. For example, if you drag it to the Rows shelf, you’ll see a list of combined values like:

  • Furniture, Bookcases
  • Furniture, Chairs
  • Office Supplies, Art
  • Technology, Phones

When to use this method: Use the "Combine Fields" feature when you need a quick, simple combination of two or more dimensions and are happy with the default comma-space separator. It’s perfect for exploratory analysis or creating quick labels.

Limitations: You can't change the separator (it's always ", ") or add any custom text. For that, you’ll need a calculated field.

Method 2: The Powerful & Flexible Calculated Field

When you need more control over the output, calculated fields are the way to go. They allow you to define exactly how your fields should be combined, including specifying custom separators, adding descriptive text, and handling different data types.

This method uses simple formulas to concatenate (or "add") strings together.

Scenario A: Combining First and Last Names

Let's say your data has [First Name] and [Last Name] columns, and you want to create a [Full Name] field.

  1. Navigate to the top menu and select Analysis → Create Calculated Field. Or, right-click anywhere in an empty area of the Data pane and select Create Calculated Field.
  2. In the Calculated Field dialog box, give your new field a name, like "Full Name".
  3. In the formula box, you'll combine the fields using the + operator. To add a space between the names, you'll need to include a space enclosed in quotes:
  4. The dialog box will show "The calculation is valid." at the bottom. Click OK.

You now have a new "Full Name" dimension in your Data pane that you can use in your visualizations to show nicely formatted names.

Scenario B: Creating Custom Labels with Text

What if you want to create a more descriptive label for a map tooltip, like "City: Austin, State: Texas"?

The process is the same but with a slightly different formula. This time, we'll embed the text literals directly into our calculation.

  1. Create a new Calculated Field and name it "Location Label".
  2. Enter the following formula:
  3. Click OK.

When you use this field in a tooltip or as a label, it will produce output like "City: Los Angeles, State: California". This is a fantastic way to make your dashboards more intuitive for your end-users.

Scenario C: Combining Strings and Numbers

A common hurdle arises when you try to combine text (a string) with a number (an integer or float). For example, you want to create a [Product Detail] field by combining [Product Name] (string) with [Product ID] (number).

If you try to use this formula, Tableau will show an error:

[Product Name] + " - ID: " + [Product ID] // THIS WILL CAUSE AN ERROR

The error occurs because you can't directly add a string and a number. You first need to convert the number into a string using the STR() function.

Here’s the correct formula:

[Product Name] + " - ID: " + STR([Product ID])

This correctly converts the Product ID number to text before combining it with the rest of the string, producing a label like "Staple pack - ID: 2145".

Best Practices and Pro Tips

As you get more comfortable combining fields, keep these tips in mind to avoid common issues.

Handling NULL Values Gracefully

What happens if one of your fields contains a NULL value? For example, if a contact record has a [First Name] but is missing a [Last Name], our "Full Name" calculation ([First Name] + " " + [Last Name]) would result in a NULL for the entire field.

To prevent this, you can use the IFNULL() function. It checks if a field is null and, if it is, replaces it with a value you specify (like an empty string "").

Here’s an improved formula for "Full Name":

IFNULL([First Name], "") + " " + IFNULL([Last Name], "")

Now, if a last name is missing, the calculation simply returns the first name, avoiding an unwanted NULL value. If your dataset is not perfectly clean, this is a great habit to adopt.

Checking Data Types

Remember the STR() function from earlier. Always double-check the data types of the fields you are combining. You can see a field's data type by the icon next to its name in the Data pane (Abc for strings, # for numbers, a calendar for dates, etc.). If you are ever in doubt, wrap your non-string fields in STR() to avoid calculation errors.

Performance on Large Datasets

For most workbooks, the performance impact of string calculations is minor. However, on extremely large datasets (millions of rows), many complex string calculations can sometimes slow down your dashboards. If you notice performance degradation and your dashboards rely heavily on these types of calculations, consider performing these combinations at the database level or in your data preparation tool (like Tableau Prep) before the data even gets to Tableau Desktop. This pre-processes the data, making your dashboards faster and more efficient.

Final Thoughts

Combining fields is a fundamental skill in Tableau that opens up a world of possibilities for creating cleaner, more readable, and more useful visualizations. Whether you choose the quick "Combine Fields" feature for rapid analysis or the robust Calculated Field for custom formatting, you now have the tools you need to shape your data exactly how you want it.

While mastering a tool like Tableau is incredibly rewarding, we know that sometimes you need clear answers without wrestling with formulas or field types. We created Graphed to remove that friction completely. You can connect your marketing and sales data, ask questions like "Show me sales by city and state for the last quarter," and instantly get a live, interactive dashboard - no manual field combination required. It's about getting to the insights faster, so you can get back to growing your business.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.