Find the variable with the highest value

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 :slight_smile:

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:

  1. Reads the last values of the variables.
  2. Finds the minimum in those values
  3. Post the result to Ubidots.

All the best!

Ubidots team