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:

  • Click one of the sort icons on the toolbar: This results in an automatic sort of the dimension based on the measure that defined the axis. Changes in data or filtering that result in a new order will be reflected in the view:

  • Click the sort icon on the axis: The option icon will become visible when you hover over the axis and then remain in place when you enable the sort. This will also result in automatic sorting:

  • Use the dropdown on the active dimension field and select Sort to view and edit the sorting options. You can also select Clear Sort to remove any sorting:

  • Drag and drop row headers to manually rearrange them. This results in a manual sort that does not get updated with data refreshes.

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

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

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