You can group related records through bucket field as per their ranges and segments and for this, you need not use any custom fields and complex formulas. You can use buckets for grouping, arranging and filtering data. You need to define multiple buckets to store multiple types of data.