For data analysts and business executives, dashboards, and data analyses must provide the information they need in a simple and concise manner. Their data and analysis should support organizations in making informed and well-argued decisions. Also, data should help companies better understand customer behavior and their needs. For all this, charts and dashboards must offer users interactivity to evaluate company performance and the ability to access the necessary information using analytical functionalities. But how do we analyze the data collected from several sources and how do we segment the information they provide to obtain new insights? Today we will discuss about how to combine two bar types in one chart and the advantages of using this type of visualization.
Tableau Software offers users the ability to combine two bar types in one chart in order to discover new perspectives and useful information. Adding and combining two types of charts into one allows data segmentation on multiple levels. Thus, the end users will access the information they are interested in in a more organized way. The segmentation of these data can be done according to categories, following that the final visualization will display the way in which these categories relate to the value of an indicator pursued in the analysis.
The combination of two bar types in one chart can also be used to analyze the evolution of indicators, such as sales or profit, over a period of time. For example, we can analyze certain categories of products in terms of profit that they have generated over a period. For this we will need a Stacked Bar Chart that will have the role of displaying the way in which the analyzed categories or dimensions contributed to a certain total.
Next, we will build a new analysis in which we will combine two bar types in one chart. Using this feature in Tableau, we will analyze the sales value of some product categories in our data set and how they relate to total sales.
→ In Tableau Desktop, connect to Superstore sample data provided by Tableau.
→ Make a bar chart. Drag the Order Date on Columns and view it Continous Month and then drag the Sales on Rows.
→ Create a parameter named Date Parameter. From the Data type select Date and from the Allowable Values select Range.
→ Create a calculated field named Bar Chart with the formula:
IF DATETRUNC(’month’, [Order Date])>=[Date Parameter]
THEN [Sales]
ELSE 0
END
→ Replace the field Sales from Rows with the calculated field Bar Chart.
→ Add the Date Parameter to the chart as a reference line.
→ Create a calculated field named Stacked Bar Chart with the formula:
IF DATETRUNC(‘month’, [Order Date])<[Date Parameter]
THEN [Sales]
ELSE 0
END
→ Add the Stacked Bar Chart calculation next to the Bar Chart field on Rows.
→ Make Dual Axis and Synchronize the Axis.
→ Add the Segment to Color Mark on Stacked Bar Chart.
→ If you swipe the line on this visualization you will be able to change the view. You can reveal/hide the different layouts. You can compare individual data points on a simple bar chart and at the same time, you can simultaneously compare sales totals and notice sharp changes at the segment level on a stacked bar chart.
By Adelina Popescu
In this Skillpill, you will learn how to create a Parliament Chart in Tableau. A Parliament Chart, or semicircular chart, represents the distribution of parliamentary seats. It is not a standard chart type in Tableau but can be manually created […]
What is a Context? Contexts are used to configure a Job for standard environments within the Software Development Life Cycle, such as Development, Testing, and Production. A Job always runs within a specific context. When a context is selected in […]
In Talend Cloud Management Console (TMC), you can create executable tasks and execution plans, which can be run directly in the Cloud or with a Remote Engine. You need to create an execution plan to allow automated runs in TMC, […]