data type fix. number: $sum, percentage: $avg