Objectives
The purpose is to perform a deeper dive into the world of descriptive analytics and produce a set of graphs and charts that enable better decision.
Please use Superstore sales data to perform analytics using pivot table.
PART 1: CREATE A HIGHLIGHT TABLE (Minute 1:20)
In Tableau, connect to Sample Superstore dataset.
1. Create a new sheet by clicking the New worksheet icon.
2. From Dimensions, drag Segment to the Columns shelf and Category and Sub-Category to the Rows shelf, then drag Shift to the Text card
3. Add color to your table by drag as Profit to the Color card and changing the Marks type to square.
4. Rename your worksheet as Highlighted Table
Question 1: Produce a highlight table for the Central Regional Manager, Sales of Sample Superstore who wants to analyze the profitability of all 17 sub-categories of products across the three vertical(e.g. Segments)-Consumer, Corporate and Home Office
(i) Which product sub-category is most profitable across all the verticals (i.e. Segments?) Why?)
(ii) Which product sub-category would the Central Regional Manager, sales be most concerned about ?
(iii) Which vertical would the manager be most and least worried about, and why?
PART 2: Build a Bar Chart (Minute 6:29)
1. In a new worksheet, drag the Order Date dimension to Columns.
The data is aggregated by year and column headers appear.
2. Drag the Sales measure to Rows.
The measure is aggregated as a sum and an axis is created. The column headers move to the bottom of the view
Tableau uses Line as the mark type because you added the date dimension
3. On the Marks card, select Bar from the drop-down list. Then view changes to the bar chart
4. Drag the Ship Mode dimension in Color on the Marks card. The view show different shipping modes have contributed to total sales overtime
5. To view data in West region only, you can filter out the other regions. To do this, drag the Region dimension again, this time from the Data pane to the Filter shelf.
7. In the Filter [Region] dialog Box , clear the Central, East, and South check boxes, and then click OK.
Question 2: How has the proportion of sales for different shipping modes in the Western region varied over the period 2014 -2017
8. Adding totals to the tops of bars in a chart is sometimes simple as clicking the Show Mark Labels icon in the toolbar.
But when the bars are broken down by color or size, each individual-segments would lenale, rather than the total for the bar. With a few steps. You can add a total label at the top of every bar even when the bars are subdivided as in the view you just created in the following procedure you will technically be adding a reference line. But by configuring that "line" in a certain way, you end up with the labels you want.
9. From the Analyst pane, drag a Reference Line into the view and drop it on Cell
10. In the Edit Line, Band, or Box dialog box, set the aggregation for SUM[Sales] to Sum, set Label to Value, and set Line under Formatting to None. Then click OK to close the Edit Reference Line, Band, or Box dialog box.
PART 3: Create a Histogram (Minute 11:08)
A histogram is a chart that displays the shape of a distribution. A histogram looks like a bar chart but groups values for
a continuous measure into ranges, or bins.
1. In a new worksheet, drag Quantity to Columns
2. Click Show Me on the toolbar, then select the histogram chart type.
The histogram chart type is available in Show Me when the view contains a single measure and no dimensions.
Three things happen after you click the histogram icon in Show Me.
The view changes to show vertical bars, with a continuous x-axis(1-14) and a continuous y-axis(0-5000)
The Quantity measure you placed on the Columns shelf, which had been aggregated as SUM, is replaced by a continuous Quantity[bin] dimension.(The green color of the field on the Columns shelf indicates that the field is continuous.)
To edit this bins in the Data pane, under Dimensions, right-click the bin and select Edit.
The Quantity measure moves to the flows shelf and the aggregation changes from SUM to CNT (Count)
The Quantity measure captures the number of items in a particular order. The histogram shows that about 4,800 orders contained two items ( the third bar),
about 2,400 orders contained 4 items(the third bar), and so on.
Let's take the view one step further and add Segment to Color to see if we can detect a relationship between the customer segment (consumer, corporate, or home office) and the quantity of items per order
3. Drag Segment to Color
4. The doesn't show a clear trend. Let's show the percentage of each bar that belongs to each segments.
Hold down the Ctrl key and drag the CNT(quantity) field from the Rows shelf Label. Holding down the Ctrl key copies the field to new location without removing it from the original location.
5. Right-click(Control-click on a Mac) the CNT(Quantity) field on the Marks card and select Quick Table Calculation
son the Marks card and > Percent of a Total. Now each colored section of each bar shows is respective percentage of the total quantity, but we want on per-bar basis