Pull in the data you need from each source (so you'll have at least two data sources in your upper left Data pane) and use the data blending functionality Tableau provides.
1 of 1 people found this helpful
In addition to what Toby said, here are some resources on how to do this:
Thank you for your replies, but I still couldn't figure out a way to do it. The links you provide appear to diverge from what I want at some point. Can you do a simple example for the below values?
Data source 1:
Data Source 2:
And I want to put these together in a new column and get a distinct count of the user ids. Thank you so much!
Tracy and Toby were describing Blending and Joining Data sources, which is what you do if you want to combine (for example) sales from one source and budget from another.
What you have described is slightly different. For that you will need to use a custom SQL connection and "UNION ALL"
"SELECT userid FROM Data Source 1
SELECT userid FROM Data Source 2"
This will stack the two data sources one on top of the other, then you can use them as normal with Tableau.
I understand what you're saying but I thought that couldn't be done with different database locations which is why I figured he was talking about a blending procedure. If all of the tables were in a single database it would work but how I read it is that Ahmet's databases are in different locations (different connections) and thus not federated.
Ahmet, if Andrew's solution doesn't work then can you give us more information about your databases? If it does work then that answers my question about how they were set up.
good point. Re-reading the question, I'm not totally sure. If they are completely isolated databases, then that is going to be tricky.
The problem is that blending won't get what he wants, so somehow he needs to do a union all.
Ahmet, we await clarification on your setup
Good Afternoon Ahmet,
So, I think what we might be lacking on this thread is a clarification. Are your databases in the same instance of MySQL? If so, then Andrew's example will work.
I've just replicated this on my instance of MySQL. I created two databases within the one instance of MySQL. superstore_sales and superstore_sales_2. Within each database I duplicated the same three tables, orders, users and returns.
In each database the total row count for orders was: 8399.
I opened Tableau desktop and connected to my localhost, superstore_sales database and then choose Custom SQL.
SELECT * FROM superstore_sales.orders
SELECT * FROM superstore_sales_2.orders
It appeared to work fine. To test, I dropped 'Number of Records' onto the workspace and confirmed success with a count of 16,798. Exactly double the number of rows in a single table and exactly what I was expecting.
Again, both databases are in the same instance of MySQL, so that might be the specifics that I've missed in your original post.
What if they were excel or csv files?