Give a chestnut! Tableau Tips (99): Use to create a master group to solve the performance problem of data fusion

published: 2021-06-01

In actual analysis scenarios, you may have encountered the following situations:

Connecting multiple different data sources at the same time is time-consuming and laborious; the various differences in the underlying data of the business become more and more chaotic; for each additional requirement, an additional data source must be added, making the original lightweight work thin and bloated.

In most cases, the construction of enterprise data warehouses usually adopts the principle of "pollution first, governance later", so that data that is easily extracted can only be obtained by fusing multiple data sources.

When we only need to add data in a certain column of the data source, we have to link a table or even a library, which slows down the performance of the entire dashboard.

Today, let us use the method of creating the main group to reduce the number of data sources, so as to make the packaging work thinner. Say goodbye to the above situation~

In this issue of "Give a Chestnut", the Tableau technique that Ada wants to share with you is: Create a master group to solve the performance problem of data integration.

Chestnut uses two data sources: Tableau's own supermarket data source and Sales Target (as shown below). Among them, Sales Target only contains province information and target value data corresponding to each province.

 

We assume this scenario: when you are a Regional Sales Director, you may value your sales goals in your market or region more. The information related to provinces and regions or markets is reflected in the data source in the example-supermarket.

In a similar situation, we can create a main group, merge only the fields you need in the secondary data source into the primary data source, and then turn off the secondary data source.In Chestnut, we set Sales Target as the main data source because it contains the measurement information of our most important target value. The supermarket data source is used as an auxiliary data source and only provides the correspondence between regions and provinces.

Specific steps are as follows:

Step 1

Open Tableau and connect the supermarket data source and Sales Target data source. Then, drag the dimension field "Province" under the Sales Target data source to the "Rows" function area as the first field in the view. At this time, TableauDesktop will default to the Sales Target data source as the main data source of the worksheet .

 

Step 2

Edit the relationship so that the "province" field in the Sales Target data source is associated with the "province/autonomous region" in the example-supermarket.

 

Step 3

At the top of the "Data" pane, select the "Sample-Supermarket" data source, and then drag the "Region" dimension to the "Rows" function area and place it in front of "Province".

Step 4

Right-click the "Region" field in the "Rows" ribbon and select "Create Primary Group".

 

Step 5

Assign provinces to a region, and then click "OK" to close the "Edit Group" dialog box.

 

Step 6

In the "Data" pane, select the "Sales Target" data source. You can see a new group field listed in the SalesTarget data source (main data source), named "Province (Group)".

Step 7

Drag the "Province (Group)" dimension to the "Region" dimension in the "Rows" function area to replace it.

Step 8

Drag the "Target Value" measure to the "Columns" shelf.

Step 9

Now you can close the supermarket data source, and you can also publish the data source or the workbook without the auxiliary data source. Because the "province/autonomous region" field you are using from the secondary data source has been replaced by the main group field you created in the main data source.

 

Have you gotten the Tableau skills in this issue? Give it a try!