How can we get relative time value difference in a single stat panel with query

I am trying to get a 30days value diffence between a data point and divide it with a static value. May I know how to achieve that ?

I can achieve value difference between a data point with relative time and difference stat but is that possible to do it in a single query ?