HI,
I would like to create a synthetic variable whose value would be the smallest value among the last value of several variables.
I’ve been looking for a way to do this with the min function, but I can’t figure out how to do it.
Your help will be greatly appreciated
Thanks
Hello @bertrandgauvreau,
The min
function makes part of the data range function, which means that using it requires entering a range, for example, “1H” (1 hour). As a consequence, making such a computation based only in a group of variable’s last value, isn’t possible, on top of the fact that said function can only receive one variable as input.
As a recommendation, this type of computation as best addressed through the UbiFunctions module, where you can code a script, in Python or NodeJS, that:
- Reads the last values of the variables.
- Finds the minimum in those values
- Post the result to Ubidots.
All the best!
Ubidots team