Bar charts

Here is a simple bar chart, similar to the one we built in Chapter 1, Taking Off with Tableau:

This bar chart makes it easy to compare the number of patient visits between various departments in the hospital. As a dimension, Department slices the data according to each distinct value such as ER, ICU, or Cardiology. It creates a header for these values because it is discrete (blue). As a measure, Number of Patient Visits gives the sum of patient visits for each department. Because it is a continuous (green) field, it defines an axis, and bars are rendered to visualize the value.

Notice that the bar chart is sorted by the department having the highest sum of patient visits at the top and the lowest at the bottom. Sorting a bar chart often adds a lot of value to the analysis because it makes it easier to make comparisons and see rank order. For example, it is easy to see that the Microbiology department has had more patient visits than the Nutrition department. If the chart wasn't sorted, this may not have been as obvious.

You can sort a view in multiple ways, as follows:

Any of these sorting methods are specific to the view and will override any default sort you defined in the metadata.