Dashboards & Visualizations

How to hide table visu when no results are available to dispaly

DataOrg
Builder

I am using splunk cloud 7.2.9. i want to hide a table visualization when it has no results/data from the results.

I was not able to hide a table if it has no results or empty.

0 Karma
1 Solution

vnravikumar
Champion

Hi

Try with <condition match="'job.resultCount' >0">

<dashboard>
  <label>tablecount</label>
  <row depends="$show_table$">
    <panel>
      <table>
        <search>
          <query>| makeresults 
| eval test=1 
| where test=0</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <done>
             <condition match="'job.resultCount' >0">
                <set token="show_table">true</set>
            </condition>
          </done>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</dashboard>

View solution in original post

vnravikumar
Champion

Hi

Try with <condition match="'job.resultCount' >0">

<dashboard>
  <label>tablecount</label>
  <row depends="$show_table$">
    <panel>
      <table>
        <search>
          <query>| makeresults 
| eval test=1 
| where test=0</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <done>
             <condition match="'job.resultCount' >0">
                <set token="show_table">true</set>
            </condition>
          </done>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</dashboard>
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...