Reducing the number of distinct values