Tableau Tutorials

Tableau Charts and Graphs

Tableau tool is also used to create different types of Tableau Charts and Graphs using visual query language. These charts are created by using measures and dimensions that we choose.

There are various charts and graphs available in Tableau:

  • Pareto Chart
  • Bullet Chart
  • Line Chart
  • Area Chart
  • Heat Map
  • Scatter Plot, and many more.

Generated Values: Tableau generates some fields (in addition to the fields present in the data set) visible in the data pane. The generated fields are:

  • Measure names
  • Measure values
  • Number of Records
  • Longitude
  • Latitude

Measure names and Measure values: These two fields are, by default, created when a data set is imported into Tableau.

Measure names contain the name of all measures present in the dataset. It is always present at the end of the dimension list and consists of discrete values.

Measure values contain the value of all measures present in the dataset. It is always present at the end of the measures list and consists of continuous values.

Use Case 1: Measure names and Measure values that can be used to see the aggregation of all measures present in the data set.

Drag Measure Names into column shelf and Measure Values into row shelf.

https://www.guru99.com/images/tableau/060818_0650_TableauChar2.jpg

It will create a Bar Chart by default s

howing all the measure names and their values.

https://www.guru99.com/images/tableau/060818_0650_TableauChar3.jpg

Use Case 2: You can also remove any measure from the visual by removing it from the mark card. For this, right-click on the measure name and click on the option Remove.

https://www.guru99.com/images/tableau/060818_0650_TableauChar4.jpg

It will remove that measure from the visualization chart.

https://www.guru99.com/images/tableau/060818_0650_TableauChar5.jpg

Use Case 3: Alias name can also be created for measure names. For this, right-click on the measure name and click on the option Edit Alias.

https://www.guru99.com/images/tableau/060818_0650_TableauChar6.jpg

An Edit Aliases window will open. Edit the alias name and click on OK.

https://www.guru99.com/images/tableau/060818_0650_TableauChar7.jpg

The name will change in the visualization.

https://www.guru99.com/images/tableau/060818_0650_TableauChar8.jpg

Use Case 4: If you want to analyze the multiple measures in a single visual, you can do this by using measure names and measure values.

Drag the measure values in the filter box. A Filter window will open. Uncheck all the measures except Profit, Quantity, and Sales. Click OK.

https://www.guru99.com/images/tableau/060818_0650_TableauChar9.jpg

It will add the measure name filter.

https://www.guru99.com/images/tableau/060818_0650_TableauChar10.jpg

The above filter will show the visual, as shown below:

https://www.guru99.com/images/tableau/060818_0650_TableauChar11.jpg

Number of Records: It is an auto-generated field that shows the count of records present in the data set. It assigns a value 1 for each record in the data set. This is mainly used to verify the count of records when joining the tables. To check the number of records, Go to the worksheet and drag the Number of Records from measure pane into row shelf. It will also create a bar chart by default. By hovering over the bar chart, the number of records can be seen.

https://www.guru99.com/images/tableau/060818_0650_TableauChar14.jpg

Longitude and Latitude: These are associated with the geographical detail when the data set consists of details like City, State, or Country. These fields are used to build a geographical map. Drag Longitude into the column shelf and Latitude into the row shelf.

https://www.guru99.com/images/tableau/060818_0650_TableauChar15.jpg

Drag State from the dimension list into the Details present in the Marks card.

https://www.guru99.com/images/tableau/060818_0650_TableauChar16.jpg

The geo-mapping visual of the above is shown below:

https://www.guru99.com/images/tableau/060818_0650_TableauChar17.jpg

Pareto Chart

A Pareto chart comprises two graphs, such as bar graph and line graph. The main purpose of using Pareto Chart is to identify the contribution of members present in a field. For example, the data source named Sample-Superstore, the measure Profit is contributed by different dimensions, i.e., Sub-Category of products that can be analyzed using the Pareto Chart. It also shows the top members and their contribution. Below is the process to create a Pareto Chart:

Step 1: Go to the worksheet, drag the dimension Sub-Category into the columns shelf, and the measure Profit into the rows shelf.

Tableau Pareto Chart

Step 2: Right-click on the field Sub-Category and select the option Sort.

Tableau Pareto Chart

Step 3: It will open the Sort window. Select the Field option under Sort By section, click on the option descending under Sort Order, and choose the Field Name as Profit and select Sum as the aggregation function.

Tableau Pareto Chart

Step 4: Drag the measure Profit into the rows shelf. Then, right-click on the newly added Profit field, and select the Dual Axis option from the list.

Tableau Pareto Chart

It will merge the X-axes of both measures and convert the visualization, as shown below:

Tableau Pareto Chart

Step 5: Go to the Marks pane, and select the SUM (Profit) form the marks pane. Click on the drop-down option and select the Bar chart from the list.

Tableau Pareto Chart

Step 6: Again, select the Sum (profit) (2) from the marks pane. Click on the drop-down option and select the line chart option from the list.

Tableau Pareto Chart

Step 7: Select the SUM (profit) on the right side of the rows shelf. Right-click on the SUM (profit) field, and select the Add Table Calculation from the list.

Tableau Pareto Chart

Step 8: It will open a Table Calculation window. Select the Running Total option as Calculation Type, and Sum as the aggregation function. Select Table (across) option under Compute Using. Click on the Add Secondary Calculation checkbox. It will expand the further window as a Secondary Calculation Type. Select the Percent of Total option from the list and again select the Table (across) option under Compute Using. Click on the Closing icon.

Tableau Pareto Chart

Step 9: Go to the Marks pane and then go to the SUM (profit) (2). Click on the color icon in the marks pane and choose a color from the available color options.

Tableau Pareto Chart

After choosing the color, the color of the line present in the graph will change.

Tableau Pareto Chart

Bullet Chart

A Bullet Chart is an indicator to show the performance of measures. It compares the two measures to each other using the bullet graph. A Bullet chart is like a Bar chart. In the bullet chart, we compare the value of one measure with another measure to find the differences between the first measure and the second measure. It is like two bars drawn upon one another to indicate their values at the same position. It is also used to merge two graphs as one to view a comparative result easily.

For example, the data source named as Sample-Superstore, you can compare the Estimated Profit with the Actual Profit. Below is the procedure to create a Bullet Chart:

Step 1: Drag the dimension Sub-Category into the column shelf and the measures Profit and Sales into the rows shelf.

It will represent the two measures as two separate categories of bar charts and each representing the values of sub-categories.

Step 2: Again, drag the measure Sales from the rows shelf into the Detail marks pane. Go to the option Show Me located on the top right side in the worksheet.

Step 3: Choose the bullet graph option from the Show Me graphs options.

Bar Chart: A bar chart compares the data across different categories. The height of the bars denotes the measured value of each category, and it is represented as vertical and horizontal type bar charts.

Tableau automatically creates a bar chart when you drag a dimension to the Rows shelf and measure to the Column shelf. The bar chart option is present under the Show Me button. If the data is not appropriate for the bar chart, then this option will be automatically blocked out.

To create a Bar Chart, you need to go to the worksheet, and drag the Category field into the column shelf and Profit field into the row shelf. By default, it creates a bar chart.

Tableau Bar Chart

Bar Chart with Color Range: Colors can be applied to the bars based on their ranges where the longer bars get darker shades, and the smaller bars get the lighter shades. For this, drag the Category field into the column shelf and Profit field into the row shelf. Also, drag the Profit field to the Color pane under the Marks Pane, and it will produce a different color for negative bars.

Tableau Bar Chart

Stacked Bar Chart: You can add one more dimension to the above bar chart to produce a stacked bar chart that will show different colors in each bar. For this, drag the Segment field and drop it into Color pane. The below-stacked chart will appear that shows the distribution of each segment in each bar.

Tableau Bar Chart

Line Chart

The Line Chart compares the data over different periods. A series of dots create a line chart, and these dots represent the measured values in each period. Measure and dimension are taken as two axes of the chart area in the line chart, and the pair of values for each observation becomes a point. After joining all these points, it becomes a line that shows the variation between the dimensions and measures.

To create a Line chart, select one dimension and one measure. Drag the dimension Order Date into Columns Shelf and Sales into the Rows shelf. It will create the line chart by default, or you can choose the Line chart option from the Show Me button.

The below line chart shows the variation of Sales for different Order Date.

Tableau Line Chart

Multiple Measure Line Chart: You can also use one dimension with two or more measures in a single line chart. It will produce various line charts in one pane, and each pane will represent the variation between a dimension and the measures.

For this, drag the dimension Order Date into Columns Shelf and measures Sales and Discount into the Rows shelf.

Tableau Line Chart

Line Chart with Label: All the points that create the line chart can be labeled to make the values of the measure visible.

For this, drop another measure Profit ratio into the Labels pane in the Marks card. Choose average as the aggregation.

Tableau Line Chart

Text Tables: Text tables are used to display the exact value of measures across different dimensions. A text table is also known as a Pivot Table. By default, it groups the dimensions and measures. 

To create a text table, go to a new Worksheet. Drag Sub-Category into Rows shelf and Profit into text box present in the marks card.

https://www.guru99.com/images/tableau/060818_0650_TableauChar36.jpg

Heat Map

The heat map visualizes the data in the form of size and color on different measures. Two different measures are visualized simultaneously using a heat map where one measure is assigned to size, and another measure is attached to the color of the heat map.

To create a Heat Map:

Step 1: Go to the worksheet and hold the Ctrl key in the keyboard. Then select the dimension Sub-Category and measure Sales.

Tableau Heat Map

Step 2: Click on the Show Me button, and select the Heatmap icon.

Tableau Heat Map

Step 3: Drag the measure Profit and drop it into the Color shelf under the Marks pane.

Tableau Heat Map

Step 4: Drag the dimension Region and drop it into the column shelf.

Tableau Heat Map

After all the above steps, Heatmap will be created.

Tableau Heat Map

Waterfall Chart: Waterfall Chart is used to visualize the cumulative effect of measures over dimensions. It can also show the contribution of growth and decline by each member in dimensions. In addition, Waterfall charts display the cumulative effect of sequential positive and negative values and show where an amount starts or ends, and how it gets there incrementally. Therefore, we can see both the size of changes and differences in values between consecutive data points. Tableau only needs one Dimension and one Measure for the creation of a Waterfall chart.

For the creation of the Waterfall Chart, follow below steps:

Step 1: Go to the worksheet, and drag the dimension Sub-Category into the column shelf and the measure Sales into the rows shelf.

Tableau Waterfall Chart

Step 2: Right-click on the Sales field present in the measures shelf. Choose the option Create, and then select the option Calculated Field.

Tableau Waterfall Chart

Step 3: It will open a Calculates Field window. Enter the name of calculates field such as –Sales and write the expression -[Sales] in the calculation area. Click on OK.

Tableau Waterfall Chart

Step 4: Drag the newly created calculation field -Sales into the Size shelf available under the Marks pane.

Tableau Waterfall Chart

Step 5: Right-click on the SUM (Sales) present in the rows shelf. Select the option Quick Table Calculation, and click on the option Running Total.

Tableau Waterfall Chart

Step 6: Click on the drop-down option and select the Gantt chart option from the list.

Tableau Waterfall Chart

After all the above steps, a waterfall chart will be created.

Tableau Waterfall Chart

Gantt chart: A Gantt chart compares the data between categories. It is also used to identify the time taken for each process. It also shows the progress of the value of a task over some time. It is used in project management and other types of variation study over some time. It takes at least one dimension and one measure in addition to the time dimension.

Below are the steps to create a Gantt chart:

Step 1: Go to the worksheet, and click on the drop-down button and select the option Gantt bar.

Tableau Gantt Chart

Step 2: Drag the dimension Order Date into the column shelf and right-click on the Order Date field and select the option Day.

Tableau Gantt Chart

Step 3: Click on the option Analysis and select the Create Calculated Field option.

Tableau Gantt Chart

Step 4: Enter the name of the calculated field like Shipping. Write the expression DATEDIFF (‘day’, [Order Date], [Ship Date]) to create the difference between the Order Date and Ship Date. Click on OK.

Tableau Gantt Chart

Step 5: Drag Ship Mode into the rows shelf and drag calculated field Shipping into the Size pane under Marks shelf.

Tableau Gantt Chart

It will create the Gantt chart that will show the time taken for each shipment across different Ship Mode.

Tableau Gantt Chart

Pie chart: A pie chart shows the segment-wise data that shows the contribution of measures over different members in a dimension. The angle of a pie determines the measured value. Different colors are used in the pie to represent the members in a dimension. A pie chart denotes the data in the form of the circle slice with different sizes and colors. 

To create a Pie chart, you need to go to the worksheet, and drag the dimension Segment and drop it into the Color and Label pane. Also, drag the measured Profit and drop it into the Size pane. Choose the chart type from Show Me pane.

Tableau Pie Chart

Drill down Pie Chart: You can also choose a dimension with the hierarchy or go deeper into the hierarchy. For example, consider a data source named Sample-Superstore, and then take the dimension Product, which consists of four more levels, such as Category, Sub-Category, Manufacturer, and Product Name.

Tableau Pie Chart

Scatter Plot

The scatter plot visualizes the relationship between the two measures and is designed by adding measures in both the x-axis and y-axis. 

To create a scatter plot, there should have at least one measure in the rows shelf and one measure in the columns shelf. However, dimensions field can be added to the scatter plot, which plays a role of different color making for the already existing points in the scatter graph.

To create a scatter plot, drag the measure Sales and drop it into the columns shelf, and drag the measure Profit and drop it into the rows shelf.

Tableau Scatter Plot

Drag the dimension Sub-Category and drop it into the Label shelf under the Marks pane.

Tableau Scatter Plot

It will create a scatter plot that shows how the Profit field and Sales field is distributed across the dimension Sub-Category of products.

Tableau Scatter Plot

You can get the values color encoded after dragging the field Sub-Category into the Color Shelf.

Tableau Scatter Plot

Area Chart

An area chart is a type of line chart in which the area between the line and the axis is color-shaded. These charts are used to represent accumulated totals over time, and they are the conventional way to display stacked lines.

To create an area chart, go to the worksheet. Drag Order Date to the Columns shelf and right-click YEAR (Order Date) and select Month.

https://help.tableau.com/current/pro/desktop/en-us/Img/area_charts1.2.png

Drag Quantity to the Rows shelf and Ship Mode to Color on the Marks card. On the Marks card, click the Mark Type drop-down and select option Area.

https://help.tableau.com/current/pro/desktop/en-us/Img/area_charts2.png

The area chart will look like:

https://help.tableau.com/current/pro/desktop/en-us/Img/area_charts1.png

Dual Axis Chart: The dual-axis chart visualizes two different measures in two different chart types. A date column and two measures are important to create a dual-axis chart. The different scales are used that helps the user to understand both measures.

Step 1: Go to the worksheet, hold the Ctrl key in the keyboard, and select the dimension Order Date, measures Sales, and Quantity.

Tableau Dual Axis Chart

Step 2: Click on the option Show Me located on the top right corner of the worksheet. Select the icon dual combination.

Tableau Dual Axis Chart

The dual-axis chart will look like:

Tableau Dual Axis Chart

Bubble Chart: The bubble chart visualizes the measures and dimensions in the form of bubbles. A bubble chart is made up of a group of circles, and each value of the dimension field represents the circles, and the value of measure represents the size of those circles. The color of bubbles differentiates the members present in a dimension.

To create a Bubble Chart, drag the measures Profit, and drop into the Size pane. Drag the dimensions Ship Mode and drop into the Labels pane. Drag the dimension Ship Mode into the Color pane under the Marks card.

Tableau Bubble Chart

Bubble Chart with Measure Values: You can show the value of the measures field that will decide the size of the circles. For this, drag the measure Sales into the Labels pane.

Tableau Bubble Chart

Bubble Chart with Measure Color: You can use the same color with different shades for all the different size circles. For this, drag the measure Sales into the Color pane. The darkest color will show the largest size of the circle, and the lighter color will show the smallest size of the circle.

Tableau Bubble Chart

Histogram: A histogram chart displays the shape of the distribution. It looks like a bar chart but group values for a continuous measure into range. Each bar represents the height of the number of values present in that range.

To create a histogram, only one measure is needed. 

Step 1: Go to the worksheet and drag the measure Quantity into the columns shelf.

Histogram

Step 2: Click on the Show Me toolbar and select the histogram chart icon.

Histogram

Step 3: After selecting the histogram chart as the chart type, the view will change and show vertical bars, with a continuous X-axis and Y-axis. The measure Quantity with SUM aggregate in columns shelf will be replaced by continuous Quantity (bin) dimension. The Quantity field moves to the rows shelf, and aggregation changes from SUM to CNT or (Count).

Histogram

Step 4: Drag the dimension Segment and drop it into the Color shelf.

Histogram

Step 5: After adding the Segment field to the Color shelf, a relationship between the Segment field and the Quantity of items can be observed.

Histogram

Step 6: Hold the Ctrl key in the keyboard and drag CNT (Quantity) field from the rows shelf into the Label shelf under the Marks pane.

Histogram

Step 7: Right-click on the CNT (Quantity) field in Marks pane and click on the option Quick Table Calculation. Select option Percent of Total.

Histogram

Now each colored section of each bar represents its percentage of the total quantity.

Histogram
Facebook Comments
Tags

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button
Close
Close