<?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: Why is the chart only valuing 15% above calculated average response? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426512#M122175</link>
    <description>&lt;P&gt;@fisuser1,&lt;BR /&gt;
If you just want to calculate the percentage, try this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=global_foo sourcetype=prd_global_bar_log firm_name="" start_time="" firm_number=""
| strcat firm_name " - Firm Number: " firm_number AS Firm
| bin _time span=60d 
| eventstats avg(duration_minutes) as avg_time by Firm
| perc_of_change=round(((duration_minutes-avg_time)/duration_minutes)*100,2)
| where perc_of_change &amp;gt; 15 
|"other searche terms"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 26 Aug 2018 02:53:50 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2018-08-26T02:53:50Z</dc:date>
    <item>
      <title>Why is the chart only valuing 15% above calculated average response?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426511#M122174</link>
      <description>&lt;P&gt;I've created a chart that only shows run times above a 60 day average and it's corresponding average, which works perfectly.  However, now my users are looking to narrow these to occurrences that are 15% and higher than said average, evidently it's too difficult to look at the numbers I am already presenting.  Any suggestions based on my existing search I have working?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=global_foo sourcetype=prd_global_bar_log firm_name="*" start_time="*" firm_number="*"
| strcat firm_name " - Firm Number:  " firm_number AS Firm
| bin _time span=60d 
| eventstats avg(duration_minutes) as avg_time by Firm
| where duration_minutes &amp;gt; avg_time 
| eval date_wday_new=if(date_wday="sunday","1. Sunday",if(date_wday="monday","2. Monday",if(date_wday="tuesday","3. Tuesday",if(date_wday="wednesday","4. Wednesday",if(date_wday="thursday","5. Thursday",if(date_wday="friday","6. Friday",if(date_wday="saturday","7. Saturday","unknown"))))))) 
| chart values(duration_minutes) as run_time by Firm date_wday_new 
| appendcols 
    [ search index=global_foo sourcetype=prd_global_bar_log firm_name="*" start_time="*" firm_number="*"
    | stats avg(duration_minutes) as Average by firm_name] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 Aug 2018 12:29:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426511#M122174</guid>
      <dc:creator>fisuser1</dc:creator>
      <dc:date>2018-08-25T12:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the chart only valuing 15% above calculated average response?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426512#M122175</link>
      <description>&lt;P&gt;@fisuser1,&lt;BR /&gt;
If you just want to calculate the percentage, try this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=global_foo sourcetype=prd_global_bar_log firm_name="" start_time="" firm_number=""
| strcat firm_name " - Firm Number: " firm_number AS Firm
| bin _time span=60d 
| eventstats avg(duration_minutes) as avg_time by Firm
| perc_of_change=round(((duration_minutes-avg_time)/duration_minutes)*100,2)
| where perc_of_change &amp;gt; 15 
|"other searche terms"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Aug 2018 02:53:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426512#M122175</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-08-26T02:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the chart only valuing 15% above calculated average response?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426513#M122176</link>
      <description>&lt;P&gt;this worked, thank you.  @renjith.nair, please copy your suggestion into the answers section, I will so you get credit.  &lt;/P&gt;

&lt;P&gt;Here's the final result.  &lt;/P&gt;

&lt;P&gt;index=global_foo sourcetype=prd_global_bar_log firm_name="" start_time="" firm_number=""&lt;BR /&gt;
| strcat firm_name " - Firm Number:  " firm_number AS Firm &lt;BR /&gt;
| bin _time span=60d &lt;BR /&gt;
| eventstats avg(duration_minutes) as avg_time by Firm &lt;BR /&gt;
| eval perc_of_change=round(((duration_minutes-avg_time)/duration_minutes)*100,2) &lt;BR /&gt;
| where perc_of_change &amp;gt; 15 &lt;BR /&gt;
| eval date_wday_new=if(date_wday="sunday","1. Sunday",if(date_wday="monday","2. Monday",if(date_wday="tuesday","3. Tuesday",if(date_wday="wednesday","4. Wednesday",if(date_wday="thursday","5. Thursday",if(date_wday="friday","6. Friday",if(date_wday="saturday","7. Saturday","unknown"))))))) &lt;BR /&gt;
| chart values(duration_minutes) as run_time by Firm date_wday_new &lt;BR /&gt;
| appendcols&lt;BR /&gt;
    [ index=global_foo sourcetype=prd_global_bar_log firm_name="" start_time="" firm_number="" &lt;BR /&gt;
    | strcat firm_name " - Firm Number:  " firm_number AS Firm &lt;BR /&gt;
    | bin _time span=60d &lt;BR /&gt;
    | eventstats avg(duration_minutes) as avg_time by Firm &lt;BR /&gt;
    | eval perc_of_change=round(((duration_minutes-avg_time)/duration_minutes)*100,2) &lt;BR /&gt;
    | where perc_of_change &amp;gt; 15 &lt;BR /&gt;
    | stats first(avg_time) as Average by Firm]&lt;BR /&gt;
| rename "2. Monday" as Monday &lt;BR /&gt;
| rename "3. Tuesday" as Tuesday &lt;BR /&gt;
| rename "4. Wednesday" as Wednesday &lt;BR /&gt;
| rename "5. Thursday" as Thursday &lt;BR /&gt;
| rename "6. Friday" as Friday &lt;BR /&gt;
| fields - firm_name &lt;BR /&gt;
| fillnull value="."&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426513#M122176</guid>
      <dc:creator>fisuser1</dc:creator>
      <dc:date>2020-09-29T21:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the chart only valuing 15% above calculated average response?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426514#M122177</link>
      <description>&lt;P&gt;@fisuser1, glad to know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Aug 2018 13:45:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-chart-only-valuing-15-above-calculated-average/m-p/426514#M122177</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-08-26T13:45:00Z</dc:date>
    </item>
  </channel>
</rss>

