Dashboards & Visualizations

How to set token in a filter to show panel in dashboard

avi7326
Path Finder

I have a filter of Entity which has token t_entity and in drilldown it has All, C2V ,C2C and Cases . And I have different panels of this which is showing counts. I have a separate panel of C2V counts which I only want to show when it is selected from the filter .
Filter name-Entity
Token Name- t_entity
How is this possible to show a panel when we select it from the filter.

Labels (1)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Use the depends option on the panel to control whether is is shown or not.

<panel depends="$t_entity$">
...
</panel>

The panel will be shown if the specified token has any value, which is not exactly what you're looking for.  In this case, we want to set a different token if t_entity has a specific value.

<input token=t_entity ...>
  ...
  <change>
    <condition value="C2V">
      <set token="show_panel">1</set>
    </condition>
    <condition>
      <unset token="show_panel" />
    </condition>
  </change>
</input>
...
<panel depends="$show_panel$">
...
</panel>

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

avi7326
Path Finder

where should I put this in my query as my query starts with-

<row>
<panel>
<title></title>
<single><search>

<query></query>
<earliest>

<latest>
<sampleRatio>1</sampleratio>
</search>
0 Karma

richgalloway
SplunkTrust
SplunkTrust

It's not a plug-n-play answer.  Use it as a guide for building your dashboard.  The <input> section shows parts that should be in your <input> section and the <panel> section shows how to make the panel show or hide based on a token.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...