-
1. Re: To blend or to join?
Mahfooj Khan Jan 23, 2019 8:40 PM (in response to Richard Foxworthy)Hi,
Lets talk about first difference between joining and blending data:
Joining your data can only be done when the data comes from the same source, for example from two sheet tabs within a single Excel file or two system tables from oracle database or MS SQL Server db. If that same information was stored in separate Excel files or in two different database servers, you would need to do a data blend in Tableau. A blend is always required if the data is stored in two separate "data sources" within Tableau. So even if your data is very closely related and exists in two separate files or databases, you will have to do a data blend if you are combining the data in Tableau.
When blending data, the first data source used in your view will dictate how your worksheet view in Tableau is built. The secondary (blended) data source will be able to contribute extra information, but will not be able to change the overall structure of the view. The secondary data source's values can be aggregated and applied to the existing view after you have established a "relationship" by assigning a variable that both the primary and secondary data sources have in common.
While using data blending there are some data blending limitations around non-additive aggregates, such as COUNTD, MEDIAN, RAWSQLAGG, LOD{} expression, table calculation etc. Follow the link for more details Troubleshoot Data Blending - Tableau
When you should use data blending or joining?
Try to avoid data blending when you can join the two data sources outside of Tableau. If not, then you must have at least one common field shared by the two data sources you want to blend together. Whenever possible, go for a join instead of blend. If you need to combine two data sources and for whatever reason cannot manage to join the data outside of Tableau, your only option is a data blend.
As and example: (1) a data source with three columns including Category, Sub-Category and Sales, and (2) a data source with Sub-Category and detailed information about each Products sales. You could get Category sales using (1) and then blend in extra supplemental information using (2), where a relationship is built by connecting the data sources based on the Sub-Category.
You can only use joining when your data comes form the same underlying source (for example, the same Excel file or Access file or any database).
Let us know if this help.
Mahfooj