Calculation error using SUM for Graph

Hey everyone!

I have a graph that adds the data from different inputs to make it into a total graph. It calculates properly if the time is set to 15 minutes, but if I go for something like 6 hours it is just plain wrong. Can somebody see where I made an error? I’m using InfluxDB

Thanks for taking a look!