Formula with other variable last input from other device

Formula with other variable last input from other device

I need to set a formula using last input of other variable from other device, something like this:
  1. $VALUE$ * $DEVICE.VARIABLE$
I can do this conversion in device parser, but, dont work in my case, because when the user add a new value in this other device, the information in widget need to be update, so using the last value in formula is the best solution that I found.

Can you guys help me with this?