<?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: Percentile from histogram data in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354015#M5660</link>
    <description>&lt;P&gt;Can you try something like this with your data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval ph="0,0,0,0,0,0,0,1,0,34,66,66,64,68,60,79,7374,13812,0,0,0,0,0,0,0,0,0,0" | eval times="0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900" | makemv ph delim="," | makemv times delim="," | eval z=mvzip(times, ph) | mvexpand z | rex field=z "(?&amp;lt;t&amp;gt;[^\,]+)\,(?&amp;lt;ph&amp;gt;.*)" | table _time t ph | chart values(ph) as ph over t by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Mar 2018 11:00:51 GMT</pubDate>
    <dc:creator>p_gurav</dc:creator>
    <dc:date>2018-03-15T11:00:51Z</dc:date>
    <item>
      <title>Percentile from histogram data</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354014#M5659</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am pushing latency histogram data to spulk.  i.e  &lt;/P&gt;

&lt;P&gt;Number of &lt;BR /&gt;
times latency&lt;BR /&gt;
under time range  :      Time range (sec)&lt;BR /&gt;
5                   :                   1&lt;BR /&gt;
2                   :                   2&lt;BR /&gt;
1                   :                   3&lt;/P&gt;

&lt;P&gt;above histogram is created and dumped by client from individual entries of latency -&amp;gt; Latency under 1 Sec (5 times), 2 sec (2 times), 3 sec (1 time) :  1,1,1,1,1,2,2,3&lt;BR /&gt;
If i have these individual records in a field at splunk then it is easy to find out the per99() by just applying this function on that field.   But i do not have individual records and have buckets as mentioned above.&lt;/P&gt;

&lt;P&gt;What is the best way to calculate the percentile to give the same result as it should give by applying per99() on individual entries (e.g. 1,1,1,1,1,2,2,3) ?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 04:59:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354014#M5659</guid>
      <dc:creator>yashveer_arya</dc:creator>
      <dc:date>2018-03-15T04:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile from histogram data</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354015#M5660</link>
      <description>&lt;P&gt;Can you try something like this with your data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval ph="0,0,0,0,0,0,0,1,0,34,66,66,64,68,60,79,7374,13812,0,0,0,0,0,0,0,0,0,0" | eval times="0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800,900" | makemv ph delim="," | makemv times delim="," | eval z=mvzip(times, ph) | mvexpand z | rex field=z "(?&amp;lt;t&amp;gt;[^\,]+)\,(?&amp;lt;ph&amp;gt;.*)" | table _time t ph | chart values(ph) as ph over t by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Mar 2018 11:00:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354015#M5660</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-03-15T11:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile from histogram data</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354016#M5661</link>
      <description>&lt;P&gt;Thanks&lt;BR /&gt;
but i do not have common seperated list of numbers bu i have histogram i want to get this comma seperated list on the basis of count.&lt;BR /&gt;
E.g.  I have &lt;BR /&gt;
5 : 1    &lt;EM&gt;(1, 5 times)&lt;/EM&gt;&lt;BR /&gt;
2 : 2    &lt;EM&gt;(2, 2 times)&lt;/EM&gt;&lt;BR /&gt;
1 : 3    &lt;EM&gt;(3, 1 times)&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;and want 1,1,1,1,2,2,3 &lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 19:29:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354016#M5661</guid>
      <dc:creator>yashveer_arya</dc:creator>
      <dc:date>2018-03-15T19:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Percentile from histogram data</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354017#M5662</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;| makeresults | eval ph="5 : 1, 2 : 2, 1 : 3" | makemv ph delim="," | mvexpand ph | rex field=ph "(?P\d+) : (?P\d+)" | table _time t ph | chart values(ph) as ph over t by _time&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 05:53:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Percentile-from-histogram-data/m-p/354017#M5662</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-03-16T05:53:33Z</dc:date>
    </item>
  </channel>
</rss>

