Quiver time series periodic aggregate calculation error

Hi,

I’ve discovered something I would define as a bug inside Quiver while using the timeseries linked to an object.

Let me give you more details first. I have an object set containing timeseries for each of my objects. I’m using those timeseries inside quiver to show the user the raw data per object.
In parallel we are using those raw measurements to calculate a daily value (the raw data are with different frequencies: 1h, 15mins, …) in the backend part. Until here all the calculation made are correct and similar to what my user have.

Now comes the error, when I’m using the “Periodic aggregate” inside Quiver for my timeseries set it up to daily and with an aggregation type to “difference”, the value given is not similar to what I should have.

I thought the difference calculation made was midnight the next day - midnight my actual date. But when I’m redoing the calculation by hand I’ve figured that in reality it is doing my latest point of my same day - 00:00 the same day. Which is from y understanding of daily difference, completely wrong since I’ll be missing my last frequency in my calculation.

I’ve tried to change the window size in minute and increase the number to see If I could rematch my correct value and nothing seems to work.

Here are the data used for my exemple, my frequency is to the Hour and the 2 latest column indicates the two calculation difference made.
The 00:00 to 00:00 difference is the output I need and the other one is what I got from the periodic aggregate calculation.

Timestamp raw data difference
07/10/2024 00:00 548399232
07/10/2024 23:00 548501952 102720 23:00 - 00:00
08/10/2024 00:00 548502272 103040 00:00 - 00:00

I don’t know If I could use something different to have my proper output are it is simply an error from the Quiver calculation.

Thanks in advance for your time on this tricky situation I’m in.

Hi,

I think this might be a misunderstanding of the expected behavior of the “difference” aggregation option. As seen in the linked docs, the difference aggregation will output the difference between the first and last point in each window. This corresponds to 23:00 - 00:00 in your example.

Hope that helps!

Hi,

Thank you for the explanation, do you have a solution for my use-case then ?

Thanks for your time.

A workaround could be:
(1) “Periodic aggregate” card with “First Point” aggregation
(2) “Shift time series” on (1) with “Shift by” set to the window size used in the periodic aggregate
(3) “Time series formula” (2) - (1)

1 Like

Works perfectly as needed, thanks a lot :ok_hand:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.