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!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...