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!

Enterprise Security Content Update (ESCU) | New Releases

In January, the Splunk Threat Research Team had one release of new security content via the Splunk ES Content ...

Expert Tips from Splunk Professional Services, Ensuring Compliance, and More New ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Observability Release Update: AI Assistant, AppD + Observability Cloud Integrations & ...

This month’s releases across the Splunk Observability portfolio deliver earlier detection and faster ...