Dashboards & Visualizations

Changing value of x-axis field name and using it in a token

wu_weidong
Path Finder

I have a horizontal bar chart where the x-axis values are "fruits", "books", "devices" and "clothes". The x-axis title is "things". I want to change "fruits" to "food", and "devices" to "games". So I used the command "replace fruits with food in things" and similar with "devices", which worked.

Now I want to be able to click on one of the bars and with the x-value, display another panel with the x-value in the query. So I set the token "$things_v$" with "$click.value$" as the drilldown value. The query in this second panel is something like "index=main_ind things="$things_v$" | top field_a". If I did not change "fruits" to "food", and "devices" to "games", I am able to get the correct results from this query. But with the replace command, I can't get any results when I click on the bar for "food" or "games". I suspect that the query is using "food" and "games" as the filter and so did not return anything.

How can I replace the x-values, and still be able to query the original data with the new (or old) x-values?

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...