Dashboards & Visualizations

How do you hide panels which do not have values?

vikas_baranwal
Path Finder

Hello All,

Splunk Version : 6.6.2

Message showing on specific panel : No results found

I have a dynamic drop-down and if I select a value that doesn't generate any results for specific panels, I want to hide panels that don't have results.

I have seen so many answers available on Splunk answers but no one is working for me.

Thank you so much !

0 Karma
1 Solution

493669
Super Champion

add depends token to panel and it will get set if result is found and if no result is found then it will hide panel.
add tag in your query like below

<panel depends="$panel_show$">
       <chart>
         <title>Internal sourcetypes over the last 5 seconds</title>
         <search id="your_search">
           <query>YOUR QUERY</query>
           <earliest>-5s@s</earliest>
           <latest>now</latest>   
       <progress>
            <condition match="'job.resultCount' > 0">
                <set token="panel_show">true</set>
            </condition>
            <condition>
                <unset token="panel_show"/>
            </condition>
        </progress> 
         </search>
...

View solution in original post

493669
Super Champion

add depends token to panel and it will get set if result is found and if no result is found then it will hide panel.
add tag in your query like below

<panel depends="$panel_show$">
       <chart>
         <title>Internal sourcetypes over the last 5 seconds</title>
         <search id="your_search">
           <query>YOUR QUERY</query>
           <earliest>-5s@s</earliest>
           <latest>now</latest>   
       <progress>
            <condition match="'job.resultCount' > 0">
                <set token="panel_show">true</set>
            </condition>
            <condition>
                <unset token="panel_show"/>
            </condition>
        </progress> 
         </search>
...

vikas_baranwal
Path Finder

Thanks for your help..In Initial level testing, its working fine. Will let you know if I will be missing anything here.

0 Karma

vikas_baranwal
Path Finder

Hello Friend,

I have seen one problem here. There are 3 panels in one row, If data is not available in 2nd and 3rd panel then it hide both the panels.
But when data not available in all the 3 panels then again message is showing as "No results founds" for each 3 panels.
I have given 3 different token names in panel tags like depends="$panel_show1$",depends="$panel_show2$", depends="$panel_show3$" and made other required changes.

Hope you understand my point. I will be needed your help to resolve this

0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...