background:
i have a data thing “device values” that contain values and timestamps. Imagine those are your electriciy meter values. → the values go up while you are consuming energy in you home.
Now i have a long list with many value timestamp pairs and i want to show you your consumption in the month “january” to do so i need the value at the very first second of january first and the value at the very last second of the january 31st. → you usualy dont have values every second so in need to interpolate these values (with a linear function).
In this case therefore i need to have 2 values interpolated: the start and the end value.
To interpolate one value i need the last value before my exact time and the value after. so far so good. And then i need to interpolate with the “classic” interpolation formula
If what you’re trying to do is what you explained above then In your chart that displays the data just search for time stamps with month rounded down and month +1 rounded down.
Example today is April 22nd
This will give you every value from
April 1st - 12:00:00
And May 1st 11:59:59
Search will be something like
Search for device values
Date < current date :rounded down
Date > current date + months 1 :rounded down.
If you need the meter values stored in the D.B. you could set up a backend trigger to run on each entry at that time to save the current meter reading…but if there is a lot of entries to modify, I’m not sure if it’ll be done at the same exact second.
i want to display the values in a group not in a chart.
if i have the stuff in a chart the chart wouldnt give me the exact value at the time i search (it would just draw a line)
i dont know how to do the calculation in the frontend or backend. From my point of understanding bubble itself is not able to perform such calculations without a plugin correct?
Then do it in a repeating group. Data source search is same as I said above.
Text is created date or just date:formatted as custom
mmmm dd yyyy hh:mm::ss
Why do you need a complex calculation. Bubbles database is saving what you’re asking to down to the second and the search I explained above handled retrieving from the first second to last second of the month…
By all means try to calculate it with toolbox or another plug-in. Seems unnecessary from your explanation unless I’m missing an important detail.