It could be that it is the formula you state "$xx + $yy*kWh", but you're getting variable amounts of power from different generation stations throughout a month that then all have a different x and y value
That reminds me of money generating mechanic in Transport Tycoon Deluxe, where the further away goods production and consumption are, the higher is price for delivering. Even if there is a much closer source for the customer you just send the train from a factory on the other side of the map and charge for distance.