<?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 inputlookup - count of values including Null in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668722#M229387</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a lookup file and I would like to use it to search a dataset and return a table showing each entry in the lookup file with a count of their number of matches in the main dataset including displaying the entries from the lookup file which have a null value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a number of techniques, the closet I have come is:&lt;/P&gt;&lt;P&gt;dataFeedTypeId=AS&lt;BR /&gt;[| inputlookup approvedsenders&lt;BR /&gt;| fields Value&lt;BR /&gt;| return 1000 $Value]&lt;BR /&gt;| stats count as cnt_sender by sender&lt;/P&gt;&lt;P&gt;But this only shows the lookup fileentries with non-zero values (n.b. I am manually adding 1000 to the return to make it work, that's a different problem)&lt;/P&gt;&lt;P&gt;I have also tried:&lt;/P&gt;&lt;P&gt;dataFeedTypeId=AS [ | inputlookup approvedsenders | fields Value]&lt;BR /&gt;| stats count as cnt_sender by Value&lt;BR /&gt;| append&lt;BR /&gt;[ inputlookup approvedsenders | fields Value]&lt;BR /&gt;| fillnull cnt_sender&lt;BR /&gt;| stats sum(cnt_sender) as count BY Value&lt;/P&gt;&lt;P&gt;This shows all the values in the lookup file but shows a zero count against each one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 10:49:15 GMT</pubDate>
    <dc:creator>warren</dc:creator>
    <dc:date>2023-11-15T10:49:15Z</dc:date>
    <item>
      <title>inputlookup - count of values including Null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668722#M229387</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a lookup file and I would like to use it to search a dataset and return a table showing each entry in the lookup file with a count of their number of matches in the main dataset including displaying the entries from the lookup file which have a null value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a number of techniques, the closet I have come is:&lt;/P&gt;&lt;P&gt;dataFeedTypeId=AS&lt;BR /&gt;[| inputlookup approvedsenders&lt;BR /&gt;| fields Value&lt;BR /&gt;| return 1000 $Value]&lt;BR /&gt;| stats count as cnt_sender by sender&lt;/P&gt;&lt;P&gt;But this only shows the lookup fileentries with non-zero values (n.b. I am manually adding 1000 to the return to make it work, that's a different problem)&lt;/P&gt;&lt;P&gt;I have also tried:&lt;/P&gt;&lt;P&gt;dataFeedTypeId=AS [ | inputlookup approvedsenders | fields Value]&lt;BR /&gt;| stats count as cnt_sender by Value&lt;BR /&gt;| append&lt;BR /&gt;[ inputlookup approvedsenders | fields Value]&lt;BR /&gt;| fillnull cnt_sender&lt;BR /&gt;| stats sum(cnt_sender) as count BY Value&lt;/P&gt;&lt;P&gt;This shows all the values in the lookup file but shows a zero count against each one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 10:49:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668722#M229387</guid>
      <dc:creator>warren</dc:creator>
      <dc:date>2023-11-15T10:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - count of values including Null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668723#M229388</link>
      <description>&lt;P&gt;Your second search should work - is it just a simple lookup e.g. not wildcard or CIDR match? Do you have a typo in your actual search?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 11:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668723#M229388</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-15T11:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - count of values including Null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668729#M229390</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;at the moment it is just a simple lookup, there are values in the table which match the log data exactly. The first example does return the correct results (without the null values).&lt;/P&gt;&lt;P&gt;Value is the information from the lookup file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;sender is the information from the main dataset&lt;/P&gt;&lt;P&gt;cnt_sender is a variable used within the code&lt;/P&gt;&lt;P&gt;Is that how it should be?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 11:29:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668729#M229390</guid>
      <dc:creator>warren</dc:creator>
      <dc:date>2023-11-15T11:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - count of values including Null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668730#M229391</link>
      <description>&lt;P&gt;If sender is the field in the dataset, then it should be something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dataFeedTypeId=AS [ | inputlookup approvedsenders | fields Value | rename Value as sender]
| stats count as cnt_sender by sender
| append
[ inputlookup approvedsenders | fields Value | rename Value as sender]
| fillnull cnt_sender
| stats sum(cnt_sender) as count BY sender&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Nov 2023 11:35:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668730#M229391</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-15T11:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup - count of values including Null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668732#M229392</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Thank you so much, that has returned the results I was expecting.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 11:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-count-of-values-including-Null/m-p/668732#M229392</guid>
      <dc:creator>warren</dc:creator>
      <dc:date>2023-11-15T11:57:26Z</dc:date>
    </item>
  </channel>
</rss>

