Kibana vega context and timefield

I only need the dashboard filters like dates can be applied to my vega plot, adding these two lines does not work. Also, for some plots with query block inside body it will give me

url.%context% and url.%timefield% must not be used when url.body.query is set

As I said, if this way does not work, any other way to resolve this is also acceptable.

I don't want to write deterministic query inside I want it to be interactive with the dashboard filter features outside. My original plot works fine the query return things properly.