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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...