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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...