<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Token Flicking to 0 then the number i needed in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Token-Flicking-to-0-then-the-number-i-needed/m-p/560581#M38986</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using a base search to display a token.&lt;/P&gt;&lt;P&gt;However, I noticed it flicks to 0 then the number I need.&lt;/P&gt;&lt;P&gt;I need something like this -&amp;nbsp; &amp;lt;!--condition match=" $result.count$ != 0"--&amp;gt; but there is also a case where I need it to be 0. So how can I get it to display the number only when the job is 100% done. I have tried done, finalised but they all display the 0 at the wrong time and then it changes to the correct number.&lt;BR /&gt;&lt;BR /&gt;i have also tried to add in&amp;nbsp; &amp;lt;condition match=" $job.resultCount$ == 1"&amp;gt; but I still get the 0 and then the number I need&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search base="basesearch_MAIN"&amp;gt;
    &amp;lt;!-- FInd out how many process are being monitored --&amp;gt;
    &amp;lt;query&amp;gt;| stats count &amp;lt;/query&amp;gt;
    &amp;lt;progress&amp;gt;
	
      &amp;lt;set token="Token_no_of_Process"&amp;gt;$result.count$&amp;lt;/set&amp;gt;
  
	&amp;lt;/progress&amp;gt;
  &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="robertlynch2020_0-1627032561974.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15202i01335A0FA8A9C9B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="robertlynch2020_0-1627032561974.png" alt="robertlynch2020_0-1627032561974.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jul 2021 09:35:41 GMT</pubDate>
    <dc:creator>robertlynch2020</dc:creator>
    <dc:date>2021-07-23T09:35:41Z</dc:date>
    <item>
      <title>Token Flicking to 0 then the number i needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Token-Flicking-to-0-then-the-number-i-needed/m-p/560581#M38986</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using a base search to display a token.&lt;/P&gt;&lt;P&gt;However, I noticed it flicks to 0 then the number I need.&lt;/P&gt;&lt;P&gt;I need something like this -&amp;nbsp; &amp;lt;!--condition match=" $result.count$ != 0"--&amp;gt; but there is also a case where I need it to be 0. So how can I get it to display the number only when the job is 100% done. I have tried done, finalised but they all display the 0 at the wrong time and then it changes to the correct number.&lt;BR /&gt;&lt;BR /&gt;i have also tried to add in&amp;nbsp; &amp;lt;condition match=" $job.resultCount$ == 1"&amp;gt; but I still get the 0 and then the number I need&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search base="basesearch_MAIN"&amp;gt;
    &amp;lt;!-- FInd out how many process are being monitored --&amp;gt;
    &amp;lt;query&amp;gt;| stats count &amp;lt;/query&amp;gt;
    &amp;lt;progress&amp;gt;
	
      &amp;lt;set token="Token_no_of_Process"&amp;gt;$result.count$&amp;lt;/set&amp;gt;
  
	&amp;lt;/progress&amp;gt;
  &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="robertlynch2020_0-1627032561974.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15202i01335A0FA8A9C9B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="robertlynch2020_0-1627032561974.png" alt="robertlynch2020_0-1627032561974.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 09:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Token-Flicking-to-0-then-the-number-i-needed/m-p/560581#M38986</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2021-07-23T09:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Token Flicking to 0 then the number i needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Token-Flicking-to-0-then-the-number-i-needed/m-p/560675#M38997</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/141978"&gt;@robertlynch2020&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have unset token&amp;nbsp;Token_no_of_Process whenever there is a change in Time Picker. Due to this,&amp;nbsp; the value of the token would be set&amp;nbsp;every time, as the base search will be executed due to a change in the token.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if you calculate value when by appending &lt;EM&gt;| stats count&lt;/EM&gt; then even if the output is zero job.resultCount will have value 1 (because one result with value zero is returned). Hence it would be preferable to calculate in the base search query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try the below solution?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;search id="basesearch_MAIN"&amp;gt;
    &amp;lt;query&amp;gt;index="_internal" | dedup sourcetype | table sourcetype&amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;$time_token.earliest$&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;$time_token.latest$&amp;lt;/latest&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;label&amp;gt;test&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time_token" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-4h@h&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;unset token="Token_no_of_Process"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$never_show_this_panel$"&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Test Count&amp;lt;/title&amp;gt;
        &amp;lt;search base="basesearch_MAIN"&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;condition match="'job.resultCount'==0"&amp;gt;
              &amp;lt;set token="Token_no_of_Process"&amp;gt;Zero Count&amp;lt;/set&amp;gt;
            &amp;lt;/condition&amp;gt;
            &amp;lt;condition&amp;gt;
              &amp;lt;set token="Token_no_of_Process"&amp;gt;Non-Zero&amp;lt;/set&amp;gt;
            &amp;lt;/condition&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel depends="$Token_no_of_Process$"&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Test Count $Token_no_of_Process$ &amp;lt;/title&amp;gt;
        &amp;lt;search base="basesearch_MAIN"&amp;gt;
          &amp;lt;query&amp;gt;| stats count&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 11:14:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Token-Flicking-to-0-then-the-number-i-needed/m-p/560675#M38997</guid>
      <dc:creator>jhanvidattani</dc:creator>
      <dc:date>2021-07-24T11:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Token Flicking to 0 then the number i needed</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Token-Flicking-to-0-then-the-number-i-needed/m-p/561002#M39028</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;This seems to work and thanks for your answer.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Robert Lynch&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 10:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Token-Flicking-to-0-then-the-number-i-needed/m-p/561002#M39028</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2021-07-27T10:45:54Z</dc:date>
    </item>
  </channel>
</rss>

