Give a chestnut! Tableau Tips (56): Make your own dashboard

published: 2021-05-31

Recently, we have received many needs from Tableau users: I hope to learn how to make dashboards. Users love both its coolness and its ability to visually express changes in indicators.

 

Although, from a professional point of view, we do not particularly agree that everyone uses Tableau to make dashboards, but this does not mean that Tableau cannot achieve it.

Today, I will teach you how to use the dashboard!

In this issue of "Cite a Chestnut", the Tableau tips that Ada wants to share with you are: make your own dashboard.

To facilitate learning, we have virtualized a set of data with only the order date and sales. You can prepare a similar data source to learn to make dashboards. ("Lazy cancer patients" please contact Xiaoyou to obtain the original data source used by the chestnut~)

Specific steps are as follows:

Step 1:Preparation

First, we need to make some adjustments to the Excel data source: the original data source is the sales volume that changes with the order date:

Copy and paste the data in the "Order Date" column of the original data source after the original data in the "Order Date" column (only copy and paste once), and fill in the "Sales" column data corresponding to the copied order date "0".

To the right of the "Sales" column, add a new column to "Size". The order date of the original data corresponds to 0 in this column, and the copied order date corresponds to 1 in this column. Form a new data source (as shown below):

Next, we need to download the required dashboard pictures on the Internet (as shown below).

View the picture properties and calculate the ratio of the picture's height to width.

 

The ratio of width to height in this picture is about 2:1, and the preliminary preparation is completed here.

Tips: The image of the semi-circular dashboard used in the example, from left to right represents the increasing amount (as the sales increase, the pointer will slide to the right synchronously).

Step 2:data processing

Open Tableau and import the adjusted data source, and confirm that the largest value in the data source for daily sales is 9800.

Change the "size" in the measurement to a dimension field, and create the required fields-angle: [sales]/9800*PI(); then create X and Y fields according to the angle, X: IIF ([angle]=0 ,0,COS(PI()-[angle])), Y: IIF([angle]=0,0,SIN(PI()-[angle])).

Finally, drag X into the column and Y into the row, select the order date as a filter, select any day of data, and display the filter as a slider, as shown below:

Tips: The sales in the example change with the date of the order, so you need to take the maximum value of daily sales.

Step 3:Make dashboard

In the map options bar of the toolbar at the top of Tableau, select the background map, and then select the data source, as shown below:

Select the dashboard image downloaded before, and set the X and Y values according to the coordinates of the points appearing in the workbook.

It should be noted here that the ratio of the length value set by X:Y and the ratio of the width and height of the dashboard image are basically the same.

The ratio in this example is 2:1, as shown below:

Since the coordinate points in the worksheet are not on the semicircular instrument panel now, you need to change the X and Y fields according to the radius of the semicircular instrument panel.

Multiply the length of X and Y by the radius of the semi-circular instrument panel 1.8, so change to X: IIF([angle]=0,0,COS(PI()-[angle])*1.8); Y: IIF([ Angle]=0,0, sin(PI()-[angle])*1.8).

Drag the "Size" field into the size of the tag card and change it to a line graph, then drag the sales into the label, and add the "Sales" annotation in the center of the semi-circular dashboard, as shown below:

In this way, a sales dashboard that changes with the order date is completed.

Hurry up and open your Tableau, give it a try!