Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Tableau data mix


May 26, 2021 Tableau


Table of contents


Data blending is a very powerful feature in Tableau. /b10> Used when you have relevant data in multiple data sources that you want to analyze together in a single view. /b11> For example, sales data exists in a relationship database, while sales target data exists in an Excel spreadsheet. /b12> "Then, in order to compare actual sales with target sales, we can mix data against common dimensions to get sales target measures." /b13> The two sources involved in data mixing are called primary and secondary data sources. /b14> A left connection is created between the primary and secondary data sources, where all data rows come from the primary and matching data rows of the secondary data source.

Prepare the data for mixing

Tableau has two built-in data sources, called The Ample-Superstore and the .mdb, which we'll use to illustrate data mixing. /b10> Let's start by loading the sample coffee chain into tableau and looking at its metadata. /b11> Go to menu data - a new data source, and browse the sample coffee chain file as an MS access database file. /b13> The following illustration shows the different tables and joins available in the file.

Tableau data mix

Add a secondary data source

Next, let's follow step Data-gt; add a secondary data source named Ample-superstore. /b10> New data source and select this data source. /b11> Both data sources are now displayed on the data window, as shown below.

Tableau data mix

Mixed data

Now we can consolidate data from both sources based on a common dimension. /b10> Note that a small chain image appears next to a dimension called State. /b11> This represents the common dimensions between the two data sources. /b12> We drag the State field from the primary data source to the row bay, and the field Profit Ratio from the secondary data source to the column rack. /b13> Let's select the bullet chart option from the bullet chart below that I get. /b14> It shows how profit margins change in each state of supermarket and coffee chains.

Tableau data mix