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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...