[SOLVED] Derived variables, possible to use conditional statement?

Hello to everybody, I’m Andrea from Italy and I’m new in Ubidots. I’d like to ask a question about derived variables but before I try to explain why I ask: with my device I measure my beer wort density exploting the different inclination of the device itself in function of the sugar content. The builder of the device provide an excel to calibrate the device but this calibration doesn’t keep in consideration the temperature variation of the density. I have a table with the correction that has to be made to the density reading in function of temperature (i.e. if the temparture is between 30 and 32 degrees I have to add a factor 2 to the density and so on). For me is impossible to draw a math function to describe the density variation in function of temperature so the only way I see is to use a nested IFs statements:

IF temperature>=30 AND temperture <= 32 THEN density=density+2 ELSE IF …

(I admit I’m a programmer)

And I’d like to ask if it is possible to realize this using a derived variable and, in case, what is the correct syntax to use…

Could you help me?
Thanks and regards
Andrea

Hello Andrea - @the_dragonlord!

Firstly, Welcome to Ubidots, we’re so happy to have users with cool projects like yours! :smiley:

At the moment the platform doesn’t support the conditionals on the Derived functions, so you’ll not be available to do it with using the Derived Variables. So, I recommend you implement the “if” statemets into your code routine, once the statements comply with the conditions laid down, send the desity value(density+2) to Ubidots.

I hope this would help you!
Best Regards,
Maria C.