Math expression not working properly


I am trying to get the difference between first and last value of a query, and I tried to get by to different querys. I get in two different querys the values and tried to do a math expression that doesn’t seems to work properly, and I don’t understand why

Anyone could help me understanding how can I get the desired result?

welcome @antoniomanuelcadiz

Check out this function that can do the same

It does not work or a Im missing something? The following screenshots may help you and me

The value bellow 1 is the goal for me, for having more context

Following there is the query I tried

Remove time grouping from the query

Okey, thanks for the explanation, I tried your tip, removing that element make it works!

Thank you, and I hope that the wiki about functions would’ve more examples and a more clarify explanation