<?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 Re: help on if condition for results = 0 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494751#M194538</link>
    <description>&lt;P&gt;Great @jip31. Can you please upvote and accept this answer to close this question?&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2019 06:18:14 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2019-10-10T06:18:14Z</dc:date>
    <item>
      <title>help on if condition for results = 0</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494748#M194535</link>
      <description>&lt;P&gt;hello&lt;/P&gt;

&lt;P&gt;In a panel table, I need to display every key_path even if the key_path result = 0&lt;BR /&gt;
I have done an if condition but it doenst works&lt;BR /&gt;
could you help me please??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="toto" sourcetype="WinRegistry" key_path="HKLM\\software\\microsoft\\windows nt\\currentversion\\xx" OR key_path="HKLM\\software\\microsoft\\windows nt\\currentversion\\yy" OR key_path="HKLM\\software\\wow6432node\\zz" 
| stats dc(host) as test by sourcetype key_path 
| eval test=if(test==0,"0", test)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494748#M194535</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-09-30T02:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: help on if condition for results = 0</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494749#M194536</link>
      <description>&lt;P&gt;@jip31 &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="toto" sourcetype="WinRegistry" key_path="HKLM\\software\\microsoft\\windows nt\\currentversion\\xx" OR key_path="HKLM\\software\\microsoft\\windows nt\\currentversion\\yy" OR key_path="HKLM\\software\\wow6432node\\zz" 
| stats dc(host) as count by sourcetype key_path | append [| makeresults | eval sourcetype="WinRegistry", count=0, key_path="HKLM\\software\\microsoft\\windows nt\\currentversion\\xx||HKLM\\software\\microsoft\\windows nt\\currentversion\\yy||HKLM\\software\\wow6432node\\zz",key_path=split(key_path,"||") | mvexpand key_path | table sourcetype key_path count] | stats sum(count) as count by sourcetype key_path
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Oct 2019 06:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494749#M194536</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-10-10T06:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: help on if condition for results = 0</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494750#M194537</link>
      <description>&lt;P&gt;hi its perfect thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 06:15:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494750#M194537</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-10-10T06:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: help on if condition for results = 0</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494751#M194538</link>
      <description>&lt;P&gt;Great @jip31. Can you please upvote and accept this answer to close this question?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 06:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-if-condition-for-results-0/m-p/494751#M194538</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-10-10T06:18:14Z</dc:date>
    </item>
  </channel>
</rss>

