Dashboards & Visualizations

creating a drilldown using the span from the from the source dashboard

jvmerilla
Path Finder

Hi,

I have a chart with this query:

index="sample_data" sourcetype="analytics_sampledata.csv" Status="*" "Ticket Type"="*" Priority="*"
| fields *
| rename "Reported_Assigned Date" as Reported_Assigned_Date
| eval _time = strptime(Reported_Assigned_Date, "%m/%d/%Y") | rename "Application Name" as Application
| timechart span=1mon count by Application

This is the visualization:
alt text

The span here is dynamic. It is being set by a "drop-down input"

What I want to happen is that to pass this span to the drilldown so that I the result I will get in the drilldown is only the data within that time span.

How will I do this?

0 Karma

mayurr98
Super Champion

hey @jvmerilla

Use this ready-made XML create a dashboard and simply put this XML: which has span and time picker as the input filter.
edit the dashboard add some more span according to your need.

<form>
  <label>test</label>
  <fieldset submitButton="true" autoRun="false">
    <input type="time" token="field1" searchWhenChanged="true">
      <label>Timepicker</label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>
    <input type="dropdown" token="span">
      <label>span</label>
      <choice value="5m">5 minutes</choice>
      <choice value="15m">15 minutes</choice>
      <choice value="30m">30 minutes</choice>
      <choice value="1mon">1 month</choice>
    </input>
  </fieldset>
  <row>
    <panel>
      <chart>
        <search>
          <query>index="sample_data" sourcetype="analytics_sampledata.csv" Status="*" "Ticket Type"="*" Priority="*" | fields * | rename "Reported_Assigned Date" as Reported_Assigned_Date | eval _time = strptime(Reported_Assigned_Date, "%m/%d/%Y") | rename "Application Name" as Application | timechart span=$span$ count by Application</query>
          <earliest>$field1.earliest$</earliest>
          <latest>$field1.latest$</latest>
        </search>
        <option name="charting.chart">column</option>
        <option name="charting.drilldown">all</option>
        <option name="refresh.display">progressbar</option>
        <drilldown>
          <link>
            <![CDATA[
         /app/search/test2?form.test2token=$field2$
         ]]>
          </link>
        </drilldown>
      </chart>
    </panel>
  </row>
</form>

Let me know if it helps you!

0 Karma

nikita_p
Contributor

Hi @jvmerilla,
Please check expected answer in the below link if it works for you.
https://answers.splunk.com/answers/230345/how-can-i-drill-down-from-one-panel-pie-chart-to-a.html

0 Karma

harsmarvania57
Ultra Champion

Hi @jvmerilla,

I have created sample dashboard, please find below XML in which I am supplying span value from drop-down and after that while clicking on any column it is passing span value (which I am passing from dropdown as field2 token) to another dashboard using drilldown.

<form>
  <label>test</label>
  <fieldset submitButton="true" autoRun="false">
    <input type="multiselect" token="field1" searchWhenChanged="false">
      <label>field1</label>
      <choice value="sourcetype">Sourcetype</choice>
      <search>
        <query/>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
      <delimiter> </delimiter>
    </input>
    <input type="dropdown" token="field2">
      <label>field2</label>
      <choice value="5m">5 min</choice>
      <choice value="15m">15 min</choice>
    </input>
  </fieldset>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_internal | timechart span=$field2$ count by $field1$ </query>
          <earliest>-120m</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.chart">column</option>
        <option name="charting.drilldown">all</option>
        <drilldown>
          <link>
            <![CDATA[
        /app/search/test2?form.test2token=$field2$
        ]]>
          </link>
        </drilldown>
      </chart>
    </panel>
  </row>
</form>

I hope this helps.

Thanks,
Harshil

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...