Hi @Nithin_Ramesh , unfortunately Lens cannot do this. The main reason is that the arithmetic in that formula you're using to compute the "Gap" occurs in your browser after Elasticsearch has already run the aggregations (e.g. bucketing into the bar chart you depicted) on the server.
In other words, Elasticsearch can't produce those numbers for your bar chart based on the results of Lens formulas because it has no knowledge of them.
We are actively working on adding a new query language called ESQL. When it lands, it should cover this and many other cases since all the arithmetic you define in ESQL will be performed by Elasticsearch.