Added the calculation for numeric attributes