Individual disagreements are assumed to be reflected in the preferences. Distance functions, e.g., the well-known Kemeny (1959) metric, are used to measure these disagreements. However, a disagreement on how to rank the top two alternatives may be perceived more (or less) than a disagreement on how to rank the bottom two alternatives. We propose two conditions on functions which characterize a class of weighted semi-metric functions. This class of semi-metrics allows to quantify disagreements according to where they occur in preferences. It turns out one of these functions, "the path minimizing function", is the only metric which generalizes the Kemeny metric.