Sorting the graphs

Although Tableau generates default graphs using the best practices in information visualization, often they need modification for meeting the business needs and sometimes for better representation. Tableau provides various ways to adjust and modify various aspects of the graph. Sorting is useful to display the most or least influential number or category at the top or bottom.

Getting ready

Let's use the sample file Sample – Superstore Sales (Excel). Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.

How to do it...

Once the data is loaded, perform the following steps to create and sort a simple bar graph:

  1. Drag-and-drop State into the Rows shelf.
  2. Drag-and-drop Profit into the Columns shelf.
  3. You should see the Profit totals by State in the Columns area in plain numbers.
  4. To change the text representation to a bar graph, click on the Show Me button on the toolbar (shown in the following screenshot).
  5. From the Show Me toolbar, select horizontal bars (also shown in the following screenshot).
  6. Once the bar chart is created, click on the Sort button, which has the shortest bar on the top, on the toolbar (again, shown in the following screenshot) to show the least profitable State value up at the top.
  7. You'll see that Montana is the least profitable state with $9,127 in profit. To see the most profitable State value, click on the Sort button (this button has the longest bar at the top) to the right.
  8. You'll see that Illinois is the most profitable state with $108,532 in Profit.
    How to do it...

How it works....

Since sorted bar charts do not require the additional tasks of identifying the longest bar and comparing lengths of various bars, they are better and more effective than unsorted bar charts.

..................Content has been hidden....................

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