Tableau :Build Bullet graph | Fundamentals

 Please download the dataset 

Click for dataset


You have data about coffee shop sales. You want to compare each product’s actual sales to 0%, 50%, 75% and 100% of its sales quota goal. Display this information in a bullet graph, and then use a calculated field and color encoding to quickly determine whether each product has met its goal.

Good luck!



Create a view of Sales by Product Type and Product, sorted by Sales in descending order.

  1. From the Data pane:

    • Drag Sales to Columns.

    • Drag Product Type to Rows.

    • Drag Product to Rows, placing it to the right of Product Type.

  2. On the toolbar, select the descending Sort icon, and click it to sort the products in descending order by Sales.

Add Budget Sales (this field represents the sales quota goal) to Detail, and then add a reference line for average Budget Sales for each product.

  1. From the Data pane, drag Budget Sales to Detail on the Marks card.

  2. At the top of the Data pane, click the Analytics tab to open the Analytics pane.

  3. From the Analytics pane, under Custom, drag Reference Line into the view, and drop it over Cell in the Add a Reference Line dialog box. The Edit Reference Line, Band, or Box dialog box opens.

  4.  In the Edit Reference Line, Band, or Box dialog box:

    • Ensure Line is selected.

    • Ensure Per Cell is selected.

    • Under Line:

      • Set the first Value drop-down list to SUM (Budget Sales) and keep the second list set to Average.

      • Ensure the Label drop-down list is set to None.

    • Ensure that the check box is selected for Show recalculated line for highlighted or selected data points.

    • Click OK.

Add a distribution band to show how each product compares to 0, 50, 75, and 100% of the sales goal.

  1. From the Analytics pane, under Custom, drag Distribution Band into the view, and drop it over Cell in the Add a Distribution Band dialog box. The Edit Reference Line, Band, or Box dialog box opens.

  2. In the Edit Reference Line, Band or Box dialog box:

    • Ensure Distribution is selected.

    • Ensure Per Cell is selected.

    • Under Computation:

      • Click the Value drop-down list to open the interior dialog box.

      • Ensure the Percentages radio button is selected.

      • Under Percentages, type: 0, 50, 75, 100

      • Under Percent of, set the upper drop-down list to SUM (Budget Sales) and keep the lower list set to Average.

      • Click outside the interior dialog box to close it.

      • Ensure the Label drop-down list is set to None.

    • Click OK to close the Edit Reference Line, Band or Box dialog box.

  3. At the top of the Analytics pane, click the Data tab to display the Data pane.

Resize the bars and the view to make the distributions easier to see.

  1. On the Marks card, click Size, and click and move the slider toward the left to reduce the size of the bars.

  2. On the toolbar, use the Fit drop-down menu to change from Standard to Entire View.

Create a Boolean calculated field titled Sales Exceeds Quota? to show whether each item has met its sales quota. Add it to color with False displayed in orange and True displayed in gray.

  1. From the Analysis menu, select Create Calculated Field to open the Calculated Field editor.

  2. In the Calculated Field editor:

    • In the Name field, type: Sales Exceeds Quota?

    • In the Formula field, type: SUM([Sales]) >= SUM([Budget Sales])

    • Click OK.

  3. From the Data pane, drag Sales Exceeds Quota? to Color on the Marks card.

  4. On the Sales Exceed Quota? color legend, click the drop-down arrow and select Edit Colors. The Edit Colors dialog box opens.

  5. In the Edit Colors dialog box:

    • Click True, and then click gray in the color palette.

    • Click False, and then click orange in the color palette.

    • Click OK in Tableau Desktop, or the X in Tableau Cloud to apply the color palette and close the dialog box.

Format the Sales values to display on the axis as currency in thousands with no decimals, and then remove the grid lines from the view.

  1. Right-click the Sales axis, and then click Format.

  2. In the Format pane, on the Axis tab, under Scale, click the Numbers drop-down list, then click Currency (Custom), and set Decimal places to 0 and Units to Thousands (K).

  3. Click X to close the Format pane.

  4. From the Format menu, click Lines.

  5. In the Format Lines pane, click the Columns tab.

  6. Next to Grid Lines, use the drop-down menu to select None.

  7. Click X to close the Format Lines pane.

Good job! You’ve created a bullet graph that compares actual product sales to sales quotas, and that shows each product’s stages of progress toward its sales goal.


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