How to Find the Pivot in Tableau

Cody Schneider••7 min read

When your data is formatted with measures spread across multiple columns, creating visualizations in Tableau can feel like hitting a wall. The tool works best when your data is "tall," not "wide," and the pivot feature is the key to making that transformation. This article provides a step-by-step guide on how to find and use the pivot function in Tableau to restructure your data for powerful, flexible analysis.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Pivoting Data is Essential in Tableau

Before jumping into the "how," it's helpful to understand the "why." Data often comes in one of two formats: wide or tall. Tableau strongly prefers the tall format for most types of analysis, especially when dealing with time-series data or comparisons across categories.

Wide Data Format: In this format, each new measurement or time period gets its own column. Imagine a spreadsheet tracking quarterly sales for different regions.

  • Row 1: Region, Q1 Sales, Q2 Sales, Q3 Sales, Q4 Sales
  • Row 2: North, $10,000, $12,000, $15,000, $14,000
  • Row 3: South, $8,000, $9,000, $11,000, $13,000

While this is easy for humans to read, it's difficult for Tableau to analyze. If you wanted to create a simple line chart showing sales trends over the four quarters, it would be unnecessarily complicated. You'd have to handle each quarter's sales as a separate measure.

Tall Data Format: This format organizes the same data into fewer columns, with more rows. A single column holds all the categorical values (like quarters), and another single column holds all the corresponding numerical values (like sales).

  • Row 1: Region, Quarter, Sales Amount
  • Row 2: North, Q1, $10,000
  • Row 3: North, Q2, $12,000
  • Row 4: North, Q3, $15,000
  • Row 5: North, Q4, $14,000
  • Row 6: South, Q1, $8,000
  • ...and so on...

This "tall" structure is perfect for Tableau. You can drag the "Quarter" field to the Columns shelf and the "Sales Amount" field to the Rows shelf, and Tableau instantly creates your sales trend chart. Pivoting is the process of converting your data from the wide format to this analysis-friendly tall format.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

A Step-by-Step Guide to Finding and Using the Pivot Feature

The pivot function is located on the Data Source page in Tableau Desktop. This is the first screen you interact with after connecting to your data file. It’s where you can define joins, rename fields, and - importantly - reshape your data before you ever get to a worksheet.

Step 1: Connect to Your Data Source

First, open Tableau and connect to your data. The pivot functionality works directly with file-based sources like Microsoft Excel, text files (.csv), PDF files, and Google Sheets. If you're connecting to a server-based data source, the pivot option might not be available, which we'll discuss later.

Once you connect to your file, Tableau will take you to the Data Source page, showing you a preview of your data in a grid at the bottom of the screen.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 2: Identify and Select the Columns You Need to Pivot

Look at your data preview. Identify the columns that represent individual measures that should really be values within a single category. Using our quarterly sales example, the columns to select would be Q1 Sales, Q2 Sales, Q3 Sales, and Q4 Sales. The Region column would not be selected, as you want to keep it as a distinct dimension.

To select multiple columns:

  • Click on the first column header (e.g., 'Q1 Sales').
  • Hold down the Shift key and click on the last column header (e.g., 'Q4 Sales') to select all the columns in between.
  • Alternatively, hold down the Ctrl (or Command on Mac) key and click on each column header individually. This is useful if the columns you want to pivot aren't next to each other.

Once selected, the columns will be highlighted.

Step 3: Perform the Pivot

With your columns highlighted, you have a couple of easy ways to access the pivot option:

  1. Right-Click a Column Header: Simply right-click on any of the selected, highlighted column headers. A context menu will appear. Near the middle of this menu, you will see the option to Pivot.
  2. Use the Drop-Down Arrow: Alternatively, click the small drop-down arrow that appears when you hover over any of the selected column headers. This will open the same context menu, where you can select Pivot.

Click Pivot. Tableau instantly performs the operation. You’ll see your data grid change immediately. The wide columns you selected disappear and are replaced by two new columns.

Step 4: Rename Your New Pivot Fields

By default, Tableau names the two new columns:

  • Pivot Field Names: This column contains the headers of the original columns you selected (e.g., "Q1 Sales", "Q2 Sales", etc.).
  • Pivot Field Values: This column contains the data values that were previously in those respective columns (e.g., 10000, 12000, etc.).

These default names are functional but not very descriptive. It's crucial for clarity to rename them to something meaningful that reflects your data.

To rename a column, simply double-click its header on the Data Source page and type in a new name. For our example, you would:

  • Rename "Pivot Field Names" to "Quarter"
  • Rename "Pivot Field Values" to "Sales Amount"

That's it! Your data is now structured in a tall format and is ready for analysis. You can proceed to your first worksheet by clicking the "Sheet 1" tab.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

What If the Pivot Option is Greyed Out or Missing?

One of the most common stumbling blocks is discovering that the pivot option isn't available. You've selected your columns, but the option is either greyed out or just not there. This almost always comes down to your data source type.

Tableau’s native pivoting feature on the Data Source page is designed for specific, non-relational file types. If you’re connected live to a database server like Microsoft SQL Server, PostgreSQL, or Oracle, you won't be able to pivot the data directly on this screen.

So what are your options?

  1. Use Tableau Prep: Tableau’s data preparation tool, Tableau Prep Builder, is designed for exactly this kind of task. It has a powerful and visual pivot step that works with a much wider range of data connectors. You can connect to your database, perform the pivot in Tableau Prep, and then output a .hyper data source that's perfectly formatted for analysis in Tableau Desktop.
  2. Use Custom SQL: If you are comfortable with SQL, you can pivot the data at the source. On the Data Source page in Tableau, you can drag the "New Custom SQL" option into the canvas. You can then write a SQL query using UNION ALL or UNPIVOT (depending on the SQL dialect) to reshape the table before Tableau even ingests it. This is a more advanced approach but is very powerful for those with SQL skills.
  3. Prepare the Data Before Tableau: Finally, you can always reshape the data yourself in Excel or Google Sheets before you connect to it with Tableau. Sometimes the simplest solution is the best one.

Final Thoughts

Learning how to find and use the pivot feature in Tableau unlocks a whole new level of analytical capability. It bridges the gap between how data is often stored for human readability and how it needs to be structured for effective data visualization, turning a frustrating roadblock into a simple four-step process on the Data Source page.

Ultimately, data prep challenges like pivoting are common hurdles in any reporting process. At Graphed, we've designed our platform to eliminate this friction entirely. Instead of manually reshaping your data in tools like Tableau or Excel, you simply connect your data sources—like Shopify, Google Analytics, or Salesforce—and describe the dashboard you want in plain language. Our AI data analyst handles the necessary transformations behind the scenes, so you can go from raw data to a real-time, shareable dashboard in seconds, not hours. If you're tired of data wrangling and want to get straight to insights, you might find Graphed a much faster and more intuitive way to work with your business data.

Related Articles