Percent change from variable selections

Hi Elastic Community!

I've introduced the ELK stack to my organization, and it has been well received with the exception of one requirement I've been so far unable to meet after months of trying - deriving metrics from variable series.

I'm hoping to produce a chart like the following

where series A and B are selected from a dashboard Control, and a new series C is calculated as % change between their values.

  • Scripted fields seem to not be the solution, as the calculated % is not within a single document's fields.
  • Differences aggregations don't seem applicable, as neither dimension is a date histogram.
  • It can be achieved with hard-coding values of A and B in a lens, but this is not realistically useful for end-users.

Does anyone have suggestions for how to achieve derived metrics like this from variable series? Or is there a way to use Control selections in Formulas?

I'd love to allow end-users to change the Control selections from [A, B] to, say, [A,D] and have the series C update accordingly to show the % difference between A and D.

The application here goes beyond % change, but that happens to be what I'm most interested in. This is easy enough to do when the source being keyed off of is static, which is what the documentation includes (something like "show me the % of failures relative to all documents"), but can the key be made variable through a Control?

Thanks in advance!


Hi @jack-morrison

welcome to the Kibana community.
That is not possible yet in Kibana dashboard.

I think with the support for referenced columns in Lens formula that should be achievable.

1 Like

Thanks for the quick response, @Marco_Liberati. As a community user, what's the best way for me to support or "upvote" the formula references enhancement?

I've already upvoted the issue mentioning this post :+1:

1 Like

Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.