Dashboards & Visualizations

How to change the input filter value to drill down token value?

supraja
Path Finder

Hi team,

 

i have multiselect input filter , i need to set the value of multiselect input filter value to drilldown value of pie chart

how to change the input filter value to drill down token value. Please guide on this

Labels (1)
Tags (1)
0 Karma
1 Solution

supraja
Path Finder

<form>
<fieldset submitButton="false">
<input type="multiselect" token="tok_input" searchWhenChanged="true">
<label>drilldowncheck</label>
<fieldForLabel>city</fieldForLabel>
<fieldForValue>city</fieldForValue>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<valuePrefix>"</valuePrefix>
<valueSuffix>"</valueSuffix>
<delimiter>,</delimiter>
</input>
</fieldset>
<row>
<panel>
<chart>
<title>testing</title>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")|where city IN ($tok_input$)
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">pie</option>
<option name="charting.drilldown">all</option>
<option name="refresh.display">progressbar</option>
<drilldown>
<set token="tok_input">$click.value$</set>
<set token="form.tok_input">$click.value$</set>
</drilldown>
</chart>
</panel>
</row>
</form>

View solution in original post

0 Karma

supraja
Path Finder

<form>
<fieldset submitButton="false">
<input type="multiselect" token="tok_input" searchWhenChanged="true">
<label>drilldowncheck</label>
<fieldForLabel>city</fieldForLabel>
<fieldForValue>city</fieldForValue>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<valuePrefix>"</valuePrefix>
<valueSuffix>"</valueSuffix>
<delimiter>,</delimiter>
</input>
</fieldset>
<row>
<panel>
<chart>
<title>testing</title>
<search>
<query>| makeresults count=5
| streamstats count
| eval age = case(count=1, 25, count=2, 39, count=3, 31, count=4, 20,count=5,60)
| eval city = case(count=1 OR count=3, "San Francisco", count=2 OR count=4, "Seattle",count=5,"UAE")|where city IN ($tok_input$)
| stats avg(age) BY city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="charting.chart">pie</option>
<option name="charting.drilldown">all</option>
<option name="refresh.display">progressbar</option>
<drilldown>
<set token="tok_input">$click.value$</set>
<set token="form.tok_input">$click.value$</set>
</drilldown>
</chart>
</panel>
</row>
</form>

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Set the token name to be 

form.xxx

in your drilldown setting

where xxx is the name of your multiselect token

(you need "form." to make this work)

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...