Combine Your Data with Union in Tableau 9.3

By Roger Hau 21 Jan, 2016

Update: Tableau 9.3 is here! Download now to try out the feature outlined below. 

Data doesn’t always come ready for analysis. As many of you have experienced, some data needs a lot of work before it can be sanely analyzed.

The good news: Tableau 9.3 offers a quick fix to that problem. We’ve added Union, which helps you piece together data that’s been split into little files. Let me show you how it works with some of New York City’s bikeshare data.

When I went to the NYC portal to get the data, I was surprised to find that it had been split across multiple csv files.

Before Tableau 9.3, I would’ve had to copy and paste all of the data into a single file to do my analysis. But now I can just drag and drop the tables into the canvas to create my Union.

You can customize your Union from the table right-click menu and see the Union dialog. Here you can add more tables, remove tables, and rename your Union.

Once I’ve included all the right tables in my Union, I can check the output in the data grid. I have a problem, though: There are a ton of nulls in my data source! Here’s the view after I sort the fields alphabetically:

Turns out the NYC government renamed the fields in each file. “Bike#” was renamed to be “Bike Key.” And “Duration” became “Duration (sec),” then “Duration(Sec).” This is a pretty common problem when data is split across multiple files, which is why Tableau 9.3 lets you quickly merge columns. Just select the columns you want, right-click, and merge!

With just a few clicks, I can quickly merge and name my fields.

And now my data is ready for analysis!

For those of you who asked for a “filename” column in the Tableau 9.2 beta, you may have noticed a new column, “Table Name.” This column contains the name of the file from which each row originated. If you have dates or other information encoded in the file name, this column gives you access to it.

Tableau 9.3 is currently in beta. Sign up for our beta program, which is open to all Tableau customers.

Learn More about Tableau 9.3

Tableau 9.3 Has Arrived
We Sweat the Small Stuff in Tableau 9.3
In Tableau 9.3, Start Interacting with Your Dashboard While It Loads
Stay in the Flow with Tableau Online 9.3
Publishing Data Sources Just Got Easier in Tableau 9.3
Stay Connected with Auto Sign-In in Tableau 9.3
Say Hello to Versioning in Tableau 9.3
Dude, Where's My Workbook?
Introducing Initial SQL with Parameters in Tableau 9.3
See the New Server Management Tools in Tableau 9.3
Tableau 9.3 Beta Is Here


Submitted by David T. (não verificado) on

Will this also be available for combining data across multiple databases?

Submitted by Nicole L. on

This is a fantastic upgrade. Because of the way we get our data, we spend at least a half day quarterly adding data from different sources together into one Excel workbook. For a variety of reasons, we cannot set the data up in a more efficient way to use SQL to do a UNION ALL type query. So pleased Tableau is moving in this direction.

Submitted by John Rodat (não verificado) on

Thank you! I've been waiting a long time for something like this to be a native part of Tableau. Much of the data I work with is from the public sector and updating has been a time-consuming nuisance.

The old rule of thumb has been (and still mostly is) that 70-80 percent of the time that goes into an analysis is preparing, cleaning, structuring the data. This, along with other recent improvements means less time overall and less time spent on unproductive, but necessary mechanics.

This will significantly reduce our TTUI - Time to Useful Information.

Thanks, again. Looking forward to the production version.

Submitted by Nathalie (não verificado) on

That's a GREAT improvement! It will save us so much time!Thank you.

Submitted by Matt (não verificado) on


Submitted by Jayaraman Rajesh (não verificado) on

Fantastic improvement. Assuming no structural changes, as an extension to this, it will be great if Tableau allows selection of files in a folder based on 'star names'. Example: V:\SalesPeriod\Y????-M???-Sales.CSV- for sales records belonging to all Years and Months.
This 'Star' import should provide 'Union' based on user request. This is for the possibility where all data sources pertaining to one category (say, Sales) are in one folder and there is no requirement for union.

Submitted by Xavier Petit (não verificado) on

Love this new feature, it really is an enhancement of usability. My only comment would be that maybe the possibility to add an extra field would be useful as you may want to retain a reference to the original file. That mean I can easily remove it from extract if needs be.

Submitted by Roger Hau (não verificado) on

Hi David,

For 9.2 union will only work across files in a directory or sheets in an Excel workbook.

At TC15, we demoed the ability to union across directories in workbooks, so that's definitely on our roadmap and is coming soon! Union across tables in databases is also on the way.

If you're referring to cross-database unions, that'll take more time, but is also planned.


Submitted by Roger H. on

Hi Jayaraman,

At TC15 we did demo this functionality, we called it Wildcard Union. You could specify patterns which would find files across directories and union them together. It's not yet ready for 9.3, but it's under active development, and we hope to get it into your hands soon!


Submitted by Roger H. on

Hi Xavier,

In the last part of the post, I mention that we did add a filename column to union in 9.3, is that not what you're looking for?

We do add it automatically, and if you'd like it excluded from your extract, hiding the field should exclude it.

Feel free to contact me at if you have more questions!


Submitted by Simon Lelli (não verificado) on

Exactly. I have made this same request in the BETA forum.
Wildcarding the filenames would add a great deal of capability on top of the new flexibility that UNION provides.

Submitted by Ali H. on

Tableau would not be awesomely awesome unless you make this feature available for tables across various heterogeneous data sources (databases,excel, ...)

Submitted by Allison Brown (não verificado) on

I have the same question - this would be much more powerful if you could union text/excel file with a SQL table, for example

Submitted by Davd T (não verificado) on

"If you're referring to cross-database unions, that'll take more time, but is also planned."

This would be awesome... It would completely eliminate our need for a data warehouse because I could create consolidated extracts and send directly to Tableau Online.

Submitted by Kim C. on

Hi Roger,

Do you have to have Tableau Server to connect to files in a directory? Is it possible to set up this connection without it to prevent copying and pasting tables into one excel workbook?


Submitted by Karl Försterling (não verificado) on


what kind of union type is used? Is it an UNION or an UNION ALL?

Submitted by Justin S. on

This is great news!
Can you do union with two extracts as well?
For example, Can you union Historical Extract and Open&Current Extract?

Submitted by Mark W. on

where I can download your sample spreadsheet data sets for demo purpose? I'd like to demo this feature to others and like to use your demo data set

Submitted by Shandor (não verificado) on

DavidT, you're one of the few brave souls that points out that the legacy data world emperor has no clothes! Sure, this functionality could make a lot of mindless prep work and software go away, but it raises the ire of folks who see those duties as job security. I have a hard time convincing them that more interesting work will come their way.

Submitted by Hervé G. on


Could you kindly tell me if:

1. Will this also be available for combining data across multiple Excel Sheets in the same Excel Workbook? and
2. Will this also be available for combining data across multiple Excel Sheets in different Excel Workbooks?

Thanks in advance,


Submitted by Nicole L. on

Multiple sheets within a single workbook. Works great!

Submitted by Nicole L. on

Multiple sheets within a single workbook. Works great!

Submitted by Steve W. on

Can you join or blend Extracts from 2 different databases? (Doing it live is too slow in our case.)

Also, are there any improvements in the speed of blending?

Submitted by Dick S. on

The Union example in Tableau 9.3 shows combining multiple csv files in a folder with the exact structure.
Can 9.3 union also combine multiple excel files in a folder with each file having the same structure?

Submitted by Annemari P. on

Same question here! It's not clearly said and I cannot get it to work.

Submitted by Dick Sobel (não verificado) on

Tech support tells me that the multiple excel file feature with same file structure is coming soon. In the meanwhile you can convert the excel files back to Csv and then use union

Submitted by Suman C. on

Few enhancements are must

1. Joining between different types of data sources should be possible. for eg if Database A is of SQL and Database B is of text it should have the ability to join.

2.Should pick up files from different folders for joining ,for text and excel if the primary file(DB) which is pulled in join section of tableau is of Folder A currently it allows only files of that folder for joining with the primary file(DB). It should give an option to pull files from other folders too.

3 Filters should work between different connections. Alternate option now is Dashboard action or Parameter.Problem with parameter is there is no multiple selection option.

Submitted by Matt L. on

Is the Union functionality using Union or Union All behind the scenes? Someone else had asked this, but I'm also curious. Thanks!

Submitted by Christopher M. on


Is this true that union queries are for EXCEL only!!!

Submitted by David T. on

Chris M. - They are adding cross database queries in Tableau 10.0!

Submitted by Isidora A. on

It is great option if you can make it work, which I cannot :-(
When I drag my tables I am afterwards asked for joint (inner or left I can only choose). Which one should I choose if I want all the data to be shown? my tables are having identical structure.

Submitted by Sophia James (não verificado) on

Is it possible to union extracts stored on the Tableau server?

Submitted by Brent Knorr (não verificado) on

Are you able to do a Union on two Microsoft SQL Server databases in Tableau 10? I looked for it but it looks like only Excel is available. I have multiple identical tables on different servers that I'd like to combine so a Union would be must better than a Join for this.