Custom Sorting based on other columns in table

Custom Sorting based on other columns in table

I need the ability to apply custom sorting to a text-based dimension in the X axis where the sorting is based on another column in the table.

For example, I have a chart report where the X axis is a text label. I would like to be able to sort those text labels based on the max date or latest date in the date column of the same table so that the labels are listed in chronological order. The manual custom sorting function works for this purpose but is cumbersome and time consuming when the sort column contains many dimensions. 

Any solutions or workarounds to this issue would be greatly appreciated.