by grouping it into two. I would like to group the temperature based on its distinct value as one set of data and the remainder as another set of data.

The total revenue on both sets (the distinct value set and the second set ) should be equal to the total revenue on the complete set.

I have used the following command to get the distinct value but i am not sure of the completeness.

Why would you expect that splitting the data in the way you describe would result in equality between the sums of the split sets ? That seems unlikely...