<?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: Show increasing values with dropoff in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Show-increasing-values-with-dropoff/m-p/485905#M135959</link>
    <description>&lt;P&gt;Wow, that is really cool! I did change &lt;CODE&gt;increment=="yes"&lt;/CODE&gt; to &lt;CODE&gt;!isnull(increment)&lt;/CODE&gt; to be more flexible, but this is a cool solution that I figured had to be possible. My actual date ranges are longer than in this example, and I was hoping I could use some kind of "stepped" area chart that didn't interpolate between points, do you know if that is possible?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Mar 2020 22:19:35 GMT</pubDate>
    <dc:creator>jlieberg</dc:creator>
    <dc:date>2020-03-04T22:19:35Z</dc:date>
    <item>
      <title>Show increasing values with dropoff</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-increasing-values-with-dropoff/m-p/485903#M135957</link>
      <description>&lt;P&gt;I have a data set similar to the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"_time",source,increment
"2020-02-26","third",
"2020-02-25","third","yes"
"2020-02-21","third",
"2020-02-20","third","yes"
"2020-02-29","second",
"2020-02-28","second","yes"
"2020-02-27","second","yes"
"2020-02-26","second","yes"
"2020-02-25","second","yes"
"2020-02-24","second","yes"
"2020-02-23","second","yes"
"2020-02-22","second","yes"
"2020-03-01","first",
"2020-02-29","first","yes"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to make this chart with &lt;CODE&gt;first&lt;/CODE&gt;=blue, &lt;CODE&gt;second&lt;/CODE&gt;=red, and &lt;CODE&gt;third&lt;/CODE&gt;=green:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8485iD8409142B2D17D28/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;So for each &lt;CODE&gt;yes&lt;/CODE&gt; in the &lt;CODE&gt;increment&lt;/CODE&gt; column add 1 to the current count for the &lt;CODE&gt;source&lt;/CODE&gt;, else reset the count back to 0. If a &lt;CODE&gt;source&lt;/CODE&gt; does not have a reset column it should continue at the current count to the end of the chart.&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 19:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-increasing-values-with-dropoff/m-p/485903#M135957</guid>
      <dc:creator>jlieberg</dc:creator>
      <dc:date>2020-03-04T19:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Show increasing values with dropoff</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-increasing-values-with-dropoff/m-p/485904#M135958</link>
      <description>&lt;P&gt;Hi @jlieberg,&lt;/P&gt;

&lt;P&gt;Yes, this is possible with below query: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="time,source,increment
2020-02-26,third,
2020-02-25,third,yes
2020-02-21,third,
2020-02-20,third,yes
2020-02-29,second,
2020-02-28,second,yes
2020-02-27,second,yes
2020-02-26,second,yes
2020-02-25,second,yes
2020-02-24,second,yes
2020-02-23,second,yes
2020-02-22,second,yes
2020-03-01,first,
2020-02-29,first,yes" 
| multikv forceheader=1 
| sort source, time 
| streamstats count(increment) as step by source reset_after="("isnull(increment)")" 
| eval step=if(increment=="yes", step, 0) 
| xyseries time source step
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once you run the search, go to &lt;STRONG&gt;Visualization&lt;/STRONG&gt; tab and select &lt;STRONG&gt;Column Chart&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8484i6062750D48811307/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;In your search query you can add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval time=strftime(_time, "%y-%m-%d")
| sort source, time 
| streamstats count(increment) as step by source reset_after="("isnull(increment)")" 
| eval step=if(increment=="yes", step, 0) 
| xyseries time source step
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Mar 2020 21:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-increasing-values-with-dropoff/m-p/485904#M135958</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-04T21:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Show increasing values with dropoff</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Show-increasing-values-with-dropoff/m-p/485905#M135959</link>
      <description>&lt;P&gt;Wow, that is really cool! I did change &lt;CODE&gt;increment=="yes"&lt;/CODE&gt; to &lt;CODE&gt;!isnull(increment)&lt;/CODE&gt; to be more flexible, but this is a cool solution that I figured had to be possible. My actual date ranges are longer than in this example, and I was hoping I could use some kind of "stepped" area chart that didn't interpolate between points, do you know if that is possible?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 22:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Show-increasing-values-with-dropoff/m-p/485905#M135959</guid>
      <dc:creator>jlieberg</dc:creator>
      <dc:date>2020-03-04T22:19:35Z</dc:date>
    </item>
  </channel>
</rss>

