We are using kibana 7.17.
In one of the use cases, it is required to drill down to a dashboard based on the clicked value in a bar chart. Attached the screenshot below.
In this case, when the user clicks on a bar (for example: TAMS-41) he should be redirected to a dashboard with filter TAMS-41. But the {{event.value}} is picking up the value in x-axis which is a date.
How do I create a drill down to filter by TAMS instead of date (x-axis)
My drill down URL: {{kibanaUrl}}/app/dashboards#/view/dashboard-id?_a=(filters:!((query:(match_phrase:('alias.TAMS ID':{{event.value}})))))
How did you define the drilldown? Is it a Go to URL or Go to Dashboard one?
I've just checked with the latter and the filter is correctly applied before navigating to the new dashboard.
If you want to use the Go to URL one, the trick I think is to understand that event.value (and event.key) are just a shorthand for event.points.[0].value (and its key equivalent).
So clicking on a breakdown chart like the one shown, the chart will return two data points [x, y]: as you note the x one (timestamp) is at index 0, while the one you are interested is at index 1.
Use {{event.points.[1].value}} to retrieve the clicked category value.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.