How to Create a TWBX File in Tableau
Sharing a great Tableau dashboard should be simple, but it often gets stalled by a classic problem - the recipient opens your file only to be met with error messages because they don't have access to the underlying data. This is where Tableau's two main file types, .TWB and .TWBX, come into play. This article will show you exactly how to create a .TWBX file to ensure anyone can view your work flawlessly, every single time.
First, What's the Difference Between .TWB and .TWBX?
Understanding the distinction between a Tableau Workbook (.TWB) and a Tableau Packaged Workbook (.TWBX) is the first step to becoming a more effective Tableau user, especially when you need to collaborate. Think of it like a recipe: one is just the instructions, while the other is a full meal kit with the instructions and all the ingredients.
The .TWB File: The Blueprint
A .TWB (Tableau Workbook) file is the core file you work with in Tableau. It contains all of your hard work, including:
- The sheets, dashboards, and stories you've built.
- All the formatting, colors, labels, and chart types you've configured.
- Calculated fields, parameters, sets, and groups.
- The connection information for your data sources.
The key phrase here is "connection information." The .TWB file knows where to find your data - whether it's on a local Excel file, a cloud database, or a corporate server - but it doesn't contain the data itself. If you send just a .TWB file to a colleague, their computer will try to find the data at the exact same file path or server address. If they don't have access, the workbook will fail to load.
The .TWBX File: The Complete Package
A .TWBX (Tableau Packaged Workbook) file solves this sharing problem. It’s essentially a zip file that contains the original .TWB workbook along with a copy of any local data sources used. This bundle includes:
- The original .TWB file (with all your dashboards and formatting).
- A copy of any file-based data sources like Excel sheets, CSVs, or text files.
- Any text or image files used in your dashboards.
- Tableau Data Extracts (.hyper or .tde files) if you’ve extracted data from a live connection.
Because the data travels with the workbook, anyone with Tableau Desktop, Tableau Reader, or Tableau Public can open a .TWBX file and see your visualizations exactly as you intended, without needing direct access to the original sources.
When Should You Use a .TWBX File?
Knowing when to save your work as a packaged workbook can save you and your team a lot of headaches. Here are the most common scenarios where a .TWBX is the right choice.
1. Sharing with Colleagues or Clients
This is the number one reason to use a .TWBX. If you need to email a dashboard to a team member for feedback or send a completed report to a client who doesn't have access to your internal database, packaging the workbook ensures they can open it without any hiccups.
2. Posting on Tableau Public
Tableau Public is a fantastic platform for showcasing your data visualization skills. However, it requires a packaged workbook because the platform cannot connect to your local files or private servers. You must use a .TWBX to upload your work.
3. Archiving Your Work
Data sources change over time. If you want to create a permanent snapshot of an analysis at a specific point in time - say, the Q3 sales report from last year - saving it as a .TWBX is a great idea. It freezes the data and the report together, so you can always refer back to it without worrying that the original data source has been updated or deleted.
4. Working with Local Files
If your workbook connects to any data source that lives on your computer (like an Excel file on your desktop or a CSV in your 'Downloads' folder), a .TWBX is necessary for sharing. Without it, the recipient's copy of Tableau would be trying to find a file path that only exists on your machine.
How to Create a .TWBX File in Tableau: A Step-by-Step Guide
Creating a .TWBX is a straightforward process. There are two primary ways to do it, depending on the type of data connection you're using.
Method 1: The 'Save As' Approach (For Local Files)
This is the simplest method and works perfectly when your Tableau workbook is already connected to local files like Excel, CSV, or existing Tableau extracts (.hyper).
- Open the Tableau workbook (.TWB) that you want to package.
- Go to the top menu and click on File.
- From the dropdown menu, select Save As....
- A familiar 'Save As' dialog box will appear. At the bottom, look for the Save as type dropdown menu. This is the most important step! By default, it may be set to Tableau Workbook (.twb).*
- Click the dropdown and select Tableau Packaged Workbook (*.twbx).
- Choose your desired file name and location, then click Save.
That's it! Tableau will gather your .TWB file and all its associated local data files, bundling them into a single, portable .TWBX file.
Method 2: Create an Extract for Live Connections First
What if your workbook is connected to a live database, like Microsoft SQL Server, Snowflake, or an online source like Google Analytics? In this case, simply saving as a .TWBX isn't enough, because the workbook will still try to establish a live connection, prompting the recipient for credentials they don't have.
To solve this, you first need to create a Tableau Data Extract. An extract is a highly compressed snapshot of your data stored locally within the workbook. This breaks the link to the live database, making your workbook self-contained.
- With your workbook open, look for the tabs at the bottom-left of the window and click on the Data Source tab.
- In the top-right corner of the Data Source page, you'll see a 'Connection' setting. It will likely be set to Live. Click on the Extract radio button instead.
- After selecting 'Extract', a link will appear nearby that says Edit. This allows you to define filters to reduce the size of your extract. For example, you could filter for only the last year of data or certain product categories. This is a crucial step for preventing huge file sizes.
- Now, click on any other tab at the bottom (like 'Sheet 1') to leave the Data Source page.
- Tableau will prompt you to save the data extract. It will be saved as a .hyper file. Choose a location and name, then click Save. Tableau will then process and create the extract.
- Once the extract has been created, your workbook is now referencing a local file instead of the live database. Now you can follow Method 1: 'Save As'.
This new .TWBX now contains your workbook and the .hyper extract file, giving anyone a complete, self-contained version of your analysis that doesn't need to connect to the live database.
Troubleshooting Common .TWBX Issues
Even with a good process, you might run into a few common problems. Here's a quick guide to fixing them.
The dreaded gigantic file size.
A .TWBX that includes a massive dataset can quickly grow to hundreds of megabytes or even gigabytes, making it difficult to email. Before creating your package:
- Hide Unused Fields: In the Data Source pane, select all the columns you don't need for your visualization, right-click, and choose 'Hide.' When you create an extract, these hidden fields won't be included.
- Use Extract Filters: Before creating an extract, define filters to limit the data. If your dashboard only shows the last 12 months, there's no need to package the entire 10-year history of data.
- Aggregate Data: If your analysis doesn't require row-level detail, you can choose to aggregate data for visible dimensions when creating the extract. This creates a much smaller file.
"This workbook contains a connection to a database."
If someone opens your .TWBX and still sees a 'sign-in' prompt, it means a data source in the workbook wasn't properly converted to an extract. Open your work, go to the Data menu, and review each data source. For any that are live, right-click on them and select 'Extract Data...' to create a local copy.
Final Thoughts
Mastering the difference between .TWB and .TWBX files marks a turning point in your ability to effectively collaborate using Tableau. Remember that a .TWB file holds the design and instructions, while a .TWBX packs up those instructions with all the necessary data to go with them. This simple 'Save As' step is the key to seamless sharing and reliable archiving.
Making data accessible is a common challenge, whether you're packaging a file or trying to stitch together reports from multiple platforms. At Graphed, we felt this pain, especially when pulling performance data from places like Google Analytics, Facebook Ads, Shopify, and Salesforce. We've simplified the entire process by connecting your data sources automatically and letting you build real-time, sharable dashboards just by describing what you want to see in plain English. No more packaging files or manual CSV downloads, just connected data you can explore and share instantly.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.