<?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: How to show the percentage of unique values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-percentage-of-unique-values/m-p/354344#M104895</link>
    <description>&lt;P&gt;Perfect!&lt;/P&gt;

&lt;P&gt;Thanks, I knew it was something to do with eventstats, but couldn't get it to work!&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2017 14:33:40 GMT</pubDate>
    <dc:creator>ewanbrown</dc:creator>
    <dc:date>2017-08-08T14:33:40Z</dc:date>
    <item>
      <title>How to show the percentage of unique values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-percentage-of-unique-values/m-p/354342#M104893</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a simple search that uses top to get the top 10 countries:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   search ........ | top Country
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It will give the top 10 Countries and percentage.&lt;/P&gt;

&lt;P&gt;How can I get the same, but look at the top 10 Countries by unique users?&lt;/P&gt;

&lt;P&gt;This :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; search ..... | stats dc(ID) as users by  Country | sort users desc limit=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Will give me the top 10, but not show the % for each.&lt;/P&gt;

&lt;P&gt;Is there a way to do this?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 13:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-percentage-of-unique-values/m-p/354342#M104893</guid>
      <dc:creator>ewanbrown</dc:creator>
      <dc:date>2017-08-08T13:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the percentage of unique values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-percentage-of-unique-values/m-p/354343#M104894</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; search ..... | eventstats dc(ID) as totalUsers|stats max(totalUsers) as totalUsers dc(ID) as users by  Country | sort users desc limit=10|eval percentage=users/totalUsers*100|fields - totalUsers
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Aug 2017 13:26:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-percentage-of-unique-values/m-p/354343#M104894</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-08-08T13:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the percentage of unique values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-percentage-of-unique-values/m-p/354344#M104895</link>
      <description>&lt;P&gt;Perfect!&lt;/P&gt;

&lt;P&gt;Thanks, I knew it was something to do with eventstats, but couldn't get it to work!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 14:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-the-percentage-of-unique-values/m-p/354344#M104895</guid>
      <dc:creator>ewanbrown</dc:creator>
      <dc:date>2017-08-08T14:33:40Z</dc:date>
    </item>
  </channel>
</rss>

