I assume it's because some of your series have missing data for some periods, which breaks the .sum() function. If you use .fit() or .abs() then it will ensure that every bucket has a value and .sum() will work as intended.
.fit() is configurable and returns different values based on the mode you choose. "carry" will reuse the most recent value when there is no data. "nearest" will do the same, except that it uses the nearest, not just the most recent, so sometimes it will use the next data point. "scale" will interpolate data points so that the gaps transition "smoothly" (if your data was [1, null, null, 4], "scale" would produce [1,2,3,4]).
.abs() is just going to fill in null points with 0 I believe, didn't realize it did that until reading your post though
The documentation for each function is visible in the autocomplete and the "help" tab, but most functions could use a bit more color.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.