Filter on metric results from elastic search datasource


I created a request from Elastic datasource. On this request I calculate a max value. I want to filter on this aggregation as an SQL Having by.

In my case I want to filter to display only 4 as max fds step number.

A screenshot of my query:

How can I do that ?