DISTINCT metric function