All Apps and Add-ons

How to create a drill down in dashboard where if clicked on one panel i.e. a pie chart takes us to a second panel with table formats?

abhi04
Communicator

How to create a drill down from one panel to another? I don't have any data for example but any scenario for explanation would be really appreciated.

0 Karma
1 Solution

tiagofbmm
Influencer

Hello

Please take this example code I created (it is generic so just copy and paste to your instance).

You have a pi-chart in the top and when you click a row, it assigns a token "src" that is used below for showing a table of count agains time to that corresponding drilled down value:

  <dashboard>
  <label>DrillDownPanelToAnother</label>
  <row>
    <panel>
      <chart>
        <search>
          <query>| tstats count where index=_internal by source</query>
          <earliest>-60m@m</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.chart">pie</option>
        <drilldown>
          <set token="src">$click.value$</set>
        </drilldown>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <table>
        <search>
          <query>| tstats count where index=_internal AND source="$src$"  by _time span=1h</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
  </row>
</dashboard>

View solution in original post

tiagofbmm
Influencer

Hello

Please take this example code I created (it is generic so just copy and paste to your instance).

You have a pi-chart in the top and when you click a row, it assigns a token "src" that is used below for showing a table of count agains time to that corresponding drilled down value:

  <dashboard>
  <label>DrillDownPanelToAnother</label>
  <row>
    <panel>
      <chart>
        <search>
          <query>| tstats count where index=_internal by source</query>
          <earliest>-60m@m</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.chart">pie</option>
        <drilldown>
          <set token="src">$click.value$</set>
        </drilldown>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <table>
        <search>
          <query>| tstats count where index=_internal AND source="$src$"  by _time span=1h</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
  </row>
</dashboard>

niketn
Legend

@tiagofbmm, I think you got the requirement reversed. Drilldown from Pie Chart to Table.

@abhi04, Refer to one of my recent answers for the same (you can refer to unaccepted answer which is closed to your request): https://answers.splunk.com/answers/625052/display-different-panel-depends-on-selected-name-i.html

Also refer to Splunk Dashboard Examples App which has several examples on Drilldown.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

abhi04
Communicator

Thanks niketnilay and tiagofbmm.

0 Karma

tiagofbmm
Influencer

@niketnilay thanks for noticing that. Edited and corrected

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

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 ...