Dynamic kibana vizualization with filter dropdown

I want to render a Metric Visualization dynamically based on a dropdown filter control value. Metric value generation logic should change depending on the dropdown value.

Example scenario:
Filter dropdown field can have a value from ["daisy","rose","flower"]

Metric visualization logic is,
if (daisy) then calculate sum of daisy without sales
if (rose) then calculate sum of rose without sales
if (flower) calculate sum of all flowers with sales

Default dashboard filter should base on "sunflower". I want to change the metric value based on these conditions.
Screenshot 2022-04-26 at 10.25.27

You might be able to do this with a few pinned KQL queries that are set to display the relevant filtered results.

There's no other way that I can think of to do it, but maybe someone else will have an idea.

1 Like

Thank you for your thought. We are currently using that approach. Just looking for a more elegant way of achieving that. Will wait for other suggestions.

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