Sort by DATE, without DATE as dimension

When I put DATE in as a dimension, all values are displayed correctly, and I sort by ascending. However, I want to continue to sort by date ascending, while having the main dimension as the location. Each location has only one date, so I am not sure how to sort by date to correctly order the locations. I would like my graph to look exactly as it does where date is on the x-axis, but with the locations ordered instead. The second photo shows how locations are out of order from their dates.

@hughesm

Only displayed dimensions or aggregated metrics can be used for sorting. So, you need to transform your date as a number to use it for sorting.
You could try as example to create the following calculated field for your sorting descending to calculate the number of days until now and sum them:

SUM(DATE_DIFF(DATE,TODAY()))

Mehdi

1 Like