Blend Your Data - Tableau
Overview of Data Blending
Data blending is a method used in Tableau to combine data from multiple sources, allowing for enhanced analysis and visual representation.
It is applicable for Tableau Cloud, Tableau Desktop, and Tableau Server.
Combining Data from Multiple Sources
Data blending allows for aggregation and visualization of results from multiple data sources without creating a new dataset.
Primary Data Source: The main dataset determining the structure of the view.
Secondary Data Source: Provides additional information to supplement the primary data source.
Options to Combine Data
Relationships: Default method for blending data; allows joining of tables with varying levels of detail and adaptiveness.
Limitation: Cannot create relationships between published data sources.
Joins: Combines tables by creating new columns, established before analysis.
Limitation: Can lead to data loss or duplication and cannot involve published data sources.
Blends: Does not physically merge data but provides a visual aggregation by querying each data source independently.
Steps for Blending Data
Connect to multiple data sources: Establish connections through the Data menu.
Define Primary Data Source: Drag fields into the view; this designates the primary source.
Establish Secondary Data Source: Switch to another data source and verify linking fields are aligned.
Indicate Links: A linking icon shows the connection status between data sources.
Active links allow successful blending.
Overview of Primary and Secondary Data Sources
The primary data source restricts values shown from the secondary data source (similar to a left join).
Example: Primary source shows limited months, affecting how many months appear even if the secondary source has more data points.
To see data across more periods, switch which source is primary.
Working with Multiple Blended Data Sources
Calculations: Must be conducted within a single data source. Referencing fields from another source involves aggregation.
Dot Notation: When referencing output fields from secondary data sources, dot notation is required (e.g.,
[Source].[Field]).Limitations: You may face challenges in sorting and utilizing action filters with blended data.
Defining Blend Relationships
Establishing links requires common dimensions, termed linking fields.
Activation of linking fields can be automatic or manual depending on whether dimensions have the same names.
Example of Linking Field: Use a geographic field to analyze quota performance; values must correspond between sources to function correctly.
Handling Multiple Links
More than one linking field can be utilized, e.g., month and region for sales quotas.
Values included in views must meet criteria across both sets of data.
Be cautious of over-linking as it may create inaccurate visualizations.
Distinction Between Joins and Data Blending
Joins are executed first and then aggregated, while blending aggregates first and afterwards combines.
Left Join: Returns all rows from the left table and matches from the right, missing matches yield nulls.
Data Blending: Conducts aggregations for individual sources and compiles results based on linking fields.
Data Blending Considerations
Asterisks in views denote multiple values; resolve by ensuring unique matches in the secondary source.
Limitations of Data Blending:
Blended sources cannot be published collectively.
Secondary data must be aggregated.
Cube data sources must be primary.
Additional Resources
Articles related to data blending practices: Aliasing, field incorporation, troubleshooting, and summarized data blending methods.