Make a dataset (ex. SELECT 1 rank, 'a' name union all SELECT 2 rank, 'c' name union all SELECT 3 rank, 'd' name union all SELECT 4 rank, 'b' name order by 1) that contains the filter value and an ordering column.
Alter COUNT(*) metric in the dataset to MIN(rank) column.
Set filter option to sort filter values, then pick the sort metric from the filter's dataset.