<?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 get percentage in stats instead of count? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429778#M122903</link>
    <description>&lt;P&gt;@zacksoft&lt;BR /&gt;
Yes, we can eval one more filed &lt;CODE&gt;Bucket&lt;/CODE&gt;. For this sample data and expected output will be appreciated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 09:40:07 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2019-04-30T09:40:07Z</dc:date>
    <item>
      <title>How to get percentage in stats instead of count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429775#M122900</link>
      <description>&lt;P&gt;I am calculating number of web-calls that were served in certain seconds.&lt;BR /&gt;
| stats count(web-calls) as web-call-count by server_response.&lt;/P&gt;

&lt;P&gt;So, in x axis I see the seconds, and Y axis i see the number of web-calls ..in a column chart.&lt;BR /&gt;
What we are looking for is, "Can we get the percentage of web-calls instead of count in Y-axis" ?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 08:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429775#M122900</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-04-30T08:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get percentage in stats instead of count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429776#M122901</link>
      <description>&lt;P&gt;@zacksoft &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | stats count(web-calls) as web-call-count by server_response | eventstats sum(web-call-count) as total | eval percentage=round((web-call-count*100/total),2) | table server_response percentage
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Apr 2019 09:13:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429776#M122901</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-04-30T09:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get percentage in stats instead of count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429777#M122902</link>
      <description>&lt;P&gt;The command works perfectly. Thank you... &lt;BR /&gt;
If I may add one more thing, Is it possible to create buckets ..say something like  3 buckets.&lt;BR /&gt;
Bucket 1 showing the percentage of web-calls whose response were less than a second. &lt;BR /&gt;
Bucket 2 showing percentage of web-calls  ...between 1 to 10 sec.&lt;BR /&gt;
Bucket 3 showing  ..more tan 10 sec..&lt;/P&gt;

&lt;P&gt;May be in a column chart showing three columns as three buckets  or any other way..we can visualize ???&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 09:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429777#M122902</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-04-30T09:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get percentage in stats instead of count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429778#M122903</link>
      <description>&lt;P&gt;@zacksoft&lt;BR /&gt;
Yes, we can eval one more filed &lt;CODE&gt;Bucket&lt;/CODE&gt;. For this sample data and expected output will be appreciated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 09:40:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429778#M122903</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-04-30T09:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get percentage in stats instead of count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429779#M122904</link>
      <description>&lt;P&gt;I have put some sample data here along with more description&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/742026/creating-buckets-based-a-percentage-of-occurrence.html?minQuestionBodyLength=80"&gt;https://answers.splunk.com/answers/742026/creating-buckets-based-a-percentage-of-occurrence.html?minQuestionBodyLength=80&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 09:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-percentage-in-stats-instead-of-count/m-p/429779#M122904</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-04-30T09:56:44Z</dc:date>
    </item>
  </channel>
</rss>

