Sorting Bars Based Off Additional Dimensions


Most people are aware that you can sort bars by height in a Bar Chart.  However, the height is always determined by the total values for a given variable that is on the X-Axis. For example , we can sort a Bar Chart by height to show the sum of sales in each store location, so that the locations with more sales are shown on the left in descending order, assuming the Store Location column is on the X-Axis as shown below.



 If we wanted to add another dimension to this Bar Chart, we could color by gender, still keeping the same sort order.

 

 
What if we then wanted to sort by Males or by Females? There is no way to do this in a Bar Chart, but we can by using the Combination Chart.

Create a Combination Chart with the same x and y axis as in the Bar Chart, and then select to Series by the Gender column, keeping both Females and Males as Bars.  Then click on the Appearance tab in the Combination Chart's properties dialog and select to sort the x-axis by either Female or Male.

 

 
Below is the final output where the bars are sorted by total sales of Females per location.

 

 
Switching to sort by Males will update the graph accordingly.