<?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 create a single value trend to show the difference based on the previous day? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269738#M81179</link>
    <description>&lt;P&gt;Hi lads, i am having a similar issue. I have multple panels just doing a stats count to see the number of events. But i want to be able to compare those events for the previous 24 hours and only weekdays. Is there anyway you could assist? thanks C.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2017 15:48:29 GMT</pubDate>
    <dc:creator>colinmchugo</dc:creator>
    <dc:date>2017-07-12T15:48:29Z</dc:date>
    <item>
      <title>How to create a single value trend to show the difference based on the previous day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269734#M81175</link>
      <description>&lt;P&gt;Hi , &lt;/P&gt;

&lt;P&gt;I need to create a single value visualization  with the trend indicator. The trend indicator should be the difference based on the previous day difference.  Below is the search and the response from the search But when it calculates the trend, it's taking percentage change ie, &lt;CODE&gt;(80-20)/20 *100% = 300%&lt;/CODE&gt; instead of simply giving the difference as it is already in % (80%-20%)= +60% .&lt;/P&gt;

&lt;P&gt;Please advise if I'm missing out something here.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;day     FILLCNT     tempcount   FILRATE     totalcount
20    1        1746         80          2193
19    1        447        20          2193

      &amp;lt;query&amp;gt; sourcetype=mysourcetype  | eval  day = strftime(strptime(Timestamp,"%Y-%m-%d-%H.%M.%S.%6N"),"%d") | eval FILLCNT =if((myfillfield = "Y"),1,0)|  stats count as tempcount by day,FILLCNT| eventstats sum(tempcount) as totalcount by cur |eval FILRATE = round((tempcount /totalcount) * 100,0) |sort -FILLCNT -day &amp;lt;/query&amp;gt; 
      &amp;lt;earliest&amp;gt;-2d&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt; 
   60
    &amp;lt;option name="field"&amp;gt;FILRATE&amp;lt;/option&amp;gt;
    &amp;lt;option name="afterLabel"&amp;gt;%&amp;lt;/option&amp;gt;
    &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
    &amp;lt;option name="colorMode"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="unitPosition"&amp;gt;after&amp;lt;/option&amp;gt;
    &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="showSparkline"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;option name="showTrendIndicator"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;option name="trendColorInterpretation"&amp;gt;standard&amp;lt;/option&amp;gt;
    &amp;lt;option name="trendDisplayMode"&amp;gt;percent&amp;lt;/option&amp;gt;
    &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="useThousandSeparators"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeColors"&amp;gt;["0x65a637","0x6db7c6","0xf7bc38","0x65a637","0x65a637"]       &amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeValues"&amp;gt;[0,30,80,90]&amp;lt;/option&amp;gt;
    &amp;lt;option name="linkView"&amp;gt;search&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2016 20:56:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269734#M81175</guid>
      <dc:creator>seetharamanss</dc:creator>
      <dc:date>2016-07-22T20:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value trend to show the difference based on the previous day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269735#M81176</link>
      <description>&lt;P&gt;Change the &lt;CODE&gt;trendDisplayMode&lt;/CODE&gt; to standard from percent. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2016 22:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269735#M81176</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-22T22:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value trend to show the difference based on the previous day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269736#M81177</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;
I tried it . Still have the same problem.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2016 22:23:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269736#M81177</guid>
      <dc:creator>seetharamanss</dc:creator>
      <dc:date>2016-07-22T22:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value trend to show the difference based on the previous day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269737#M81178</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;single&amp;gt;
&amp;lt;search&amp;gt;
&amp;lt;query&amp;gt;sourcetype=mysourcetype earliest=-2d@d | eval day=strptime(Timestamp,"%Y-%m-%d-%H.%M.%S.%6N") | eval FILLCNT=if((myfillfield = "Y"),1,0) | bin span=1d day | stats count as tempcount count(eval(mygillfield="Y")) as FILLCNT by day | eventstats sum(tempcount) as totalcount | eval FILRATE=round((tempcount/totalcount) * 100,0) | fields day FILRATE&amp;lt;/query&amp;gt;
     &amp;lt;earliest&amp;gt;-2d&amp;lt;/earliest&amp;gt;
&amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
&amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x65a637","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,30,70,100]&amp;lt;/option&amp;gt;
        &amp;lt;option name="showSparkline"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="showTrendIndicator"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendColorInterpretation"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;
        &amp;lt;option name="unitPosition"&amp;gt;after&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
&amp;lt;/single&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2016 23:03:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269737#M81178</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-22T23:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value trend to show the difference based on the previous day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269738#M81179</link>
      <description>&lt;P&gt;Hi lads, i am having a similar issue. I have multple panels just doing a stats count to see the number of events. But i want to be able to compare those events for the previous 24 hours and only weekdays. Is there anyway you could assist? thanks C.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-trend-to-show-the-difference-based/m-p/269738#M81179</guid>
      <dc:creator>colinmchugo</dc:creator>
      <dc:date>2017-07-12T15:48:29Z</dc:date>
    </item>
  </channel>
</rss>

