Tableau : Build Bar-In-Bar Chart | Fundamentals

 Please download the dataset 


Click for dataset


You have sales data for office products. To compare 2018 and 2019 sales for product category and sub-category, build a bar-in-bar chart that shows 2018 sales as a small bar on top of 2019 sales as a larger bar.

Good luck!



Build a side-by-side view with 2018 Sales and 2019 Sales by Category and Sub-Category.

  1. From the Data pane:

    • Drag 2018 Sales to Columns.

    • Drag Category to Rows.

    • Drag Sub-Category to Rows, and place it to the right of Category.

  2. From the Data pane, drag 2019 Sales to the 2018 Sales axis (the horizontal axis), dropping it when two green bars appear.

NOTE: Step 2 places Measure Values on Columns, and Measure Names on Rows and the Filters card.


Stack the bars by adding Measure Names to Color and to Size.

  1. From Rows, drag Measure Names to Color on the Marks card. This stacks the marks.

  2. On the Marks card, press and hold the Ctrl key while dragging Measure Names to Size. This adds a copy of Measure Names to Size.

Change the stacked bars into bar-in-bar and sort the bars in descending order within each category.

  1. On the Analysis menu, point to Stack Marks, and select Off to start both bars at the 0 (zero) position.

  2. On Columns, click the Measure Values field to select it.

  3. On the toolbar, click the Sort Descending icon to sort the bars in descending order by sales amount.

Format the axis for currency to thousands.

  1. Right-click the Value axis and select Format. The Format Measure Values pane displays.

    • In the Format Measure Values pane to the left of the view, click the Numbers drop-down menu. The Numbers option displays.

    • Choose Currency (Custom), set Decimal places to 0 (zero), and set Display Units to Thousands (K).

    • Leave Include thousands separators checked.

    • Click in the Axis pane to close the dialog box

    • Click X to close the Format Measure Values window.

Good job! You've created a bar-in-bar chart that compares one measures directly against another. 


Comments

Popular posts from this blog

Counters as Computation Tools: Counter Machines and Their Theoretical Significance

Tableau :Build a dual and combined axis chart | Fundamentals

Tableau:Create and customize measure filters | Fundamentals