Bar in bar chart

Another possibility for showing progress toward a goal is to use bar in bar charts, such as this:

To create this view, continue in the same workbook and follow these steps:

  1. Navigate to the Bar in Bar sheet.
  2. Drag and drop Profit from the Superstore Sales data source onto the horizontal axis in the view (which is the same as dropping onto the Columns shelf).
  3. Drag and drop Region onto Rows.
  4. Drag the Profit Target field from the Profit Targets data source and drop it directly onto the horizontal axis. Since you are dropping one measure (ProfitTarget) onto the same space (in this case, an axis) that was being used by another measure (Profit), Tableau substituted the special fields Measure Names and Measure Values.

Any time you want two or more measures to share the same space within a view, you can use Measure Names and Measure Values.

Measure Names is a special dimension field that Tableau adds to every data source that is a placeholder for the names of measures. You can place it in the view anywhere you would place another dimension.

Measure Values is a special measure field that Tableau adds to every data source that is a placeholder for the values of other measures. You can use it in almost any way you would use any other measure. When these special fields are in use, you will see a new Measure Values shelf in the workspace. This shelf contains all the measures that are referenced by Measure Names and Measure Values.

You can add and remove measures from this shelf as well as rearrange the order of any on the shelf.You can drag and drop the Measure Names and Measure Values fields directly from the data pane into the view. Many times it is easier to remember that if you want two or more measures to share the same space, all you have to do is, simply drag and drop the second onto the same space that is occupied by first. For example, if you want multiple measures to define a single axis, drag and drop the second measure onto the axis. If you want two or more measures to occupy the pane, drop the second onto the pane.

  1. Move the Measure Names field from the Rows shelf to the Color shelf and edit the colors in the legend (double-click on the legend or use the drop-down arrow on the legend) and set Profit to orange and Profit Target to light gray). You now have a stacked bar chart with a different color for each measure name being used:
  1. Copy the Measure Names field from Color to the Size shelf (hold Ctrl while you drag a field in the view and drop it on another shelf in the view). This creates different sizes for each bar segment.
  2. Tableau's default is to stack marks. In this case, you do not want the bars to be stacked. Instead, you want them to overlap. To change the default behavior, from the menu navigate to Analysis | Stack Marks | Off.

The order of the measures in the Measure Values shelf will determine which marks appear on top. If the gray bars are on top of the orange bars, switch the order of the fields. Your view should now look like the bar chart similar to the first image in this section. You can further enhance the visualization by:

  • Adding a border to the bars. Accomplish this by clicking on the Color shelf and using the Border option.
  • Adjusting the size range to reduce the difference between the large and small extremes. Accomplish this by double-clicking on the Size legend (or using the caret dropdown and selecting Edit from the menu).
  • Adjusting the sizing of the view. Accomplish this by hovering over the canvas, just over the bottom border, until the mouse cursor changes to a sizing cursor, then click and drag to resize the view.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset