@sweetiegwendoline if you have irregular readings, maybe check this thread to see if the queries listed there help: Calculate Energy Consumsion manually. The Influx integrate()
function could also be helpful for working with readings at irregular time periods.
By the way, could you also clarify what your desired output is? Is it a single value (total for period), or hourly/daily/etc? I wasn’t quite sure based on what you said.