<?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 Null iplocation data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Null-iplocation-data/m-p/185621#M53491</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  . . .  | iplocation ClientIP | eval GeoLocation=case(Country="United States", "United States", Country=" ", "Views from Unknown Origins", Country!="United States" AND Country!=" ", "International") | top limit=3 GeoLocation | eval percent = round(percent,2) . " %"

The output of this query returns results like this:
GeoLocation     count       percent
United States   900         90%
International   100         10%
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However it is not returning if the value for Country is null, I've ran the search and I know for the given time range null values exist for the country field. Can this work within the eval case() query?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jun 2014 17:29:10 GMT</pubDate>
    <dc:creator>hagjos43</dc:creator>
    <dc:date>2014-06-02T17:29:10Z</dc:date>
    <item>
      <title>Null iplocation data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Null-iplocation-data/m-p/185621#M53491</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  . . .  | iplocation ClientIP | eval GeoLocation=case(Country="United States", "United States", Country=" ", "Views from Unknown Origins", Country!="United States" AND Country!=" ", "International") | top limit=3 GeoLocation | eval percent = round(percent,2) . " %"

The output of this query returns results like this:
GeoLocation     count       percent
United States   900         90%
International   100         10%
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However it is not returning if the value for Country is null, I've ran the search and I know for the given time range null values exist for the country field. Can this work within the eval case() query?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 17:29:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Null-iplocation-data/m-p/185621#M53491</guid>
      <dc:creator>hagjos43</dc:creator>
      <dc:date>2014-06-02T17:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Null iplocation data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Null-iplocation-data/m-p/185622#M53492</link>
      <description>&lt;P&gt;I figured out my own issue. &lt;EM&gt;fillnull&lt;/EM&gt; fixed it!&lt;/P&gt;

&lt;P&gt;Below is the working query:&lt;/P&gt;

&lt;P&gt;| iplocation ClientIP | &lt;STRONG&gt;fillnull value="Unknown" Country&lt;/STRONG&gt; | eval GeoLocation=case(Country="United States", "Views from the United States", Country="Unknown", "Views from Unknown Origins", Country!="United States" AND Country!="Unknown", "International Views") | top limit=3 GeoLocation | eval percent = round(percent,2) . " %"&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 19:53:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Null-iplocation-data/m-p/185622#M53492</guid>
      <dc:creator>hagjos43</dc:creator>
      <dc:date>2014-06-02T19:53:16Z</dc:date>
    </item>
  </channel>
</rss>

