<?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 build timechart (?conditional) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169436#M48415</link>
    <description>&lt;P&gt;Got more details than "not successful"?&lt;/P&gt;</description>
    <pubDate>Fri, 26 Dec 2014 17:31:38 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-12-26T17:31:38Z</dc:date>
    <item>
      <title>How to build timechart (?conditional)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169433#M48412</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I have a ticket history collected from our system:&lt;BR /&gt;
TicketNumber,State,OpenDate (od) , ClosureDate (cd)&lt;BR /&gt;
1,OPEN,od1,-&lt;BR /&gt;
2,OPEN,od2,-&lt;BR /&gt;
3,CLOSED,od3,cd3&lt;BR /&gt;
4,OPEN,od4,-&lt;BR /&gt;
5,CLOSED,od5,cd5&lt;/P&gt;

&lt;P&gt;I need to build a trend line with following criteria:&lt;/P&gt;

&lt;P&gt;X axis: date item (for example 7th of   July). &lt;BR /&gt;
Y axis: count of tickets which    was opened before this time ( OD &amp;lt;=  TimeItem ) and closed after this time  ( CD &amp;gt; TimeItem). How many tickets was opened and not closed for this time.&lt;/P&gt;

&lt;P&gt;I've built that in excel:&lt;BR /&gt;
Column of Dates | =COUNTIFS(OpenDateColumnItem,"&amp;lt;=" &amp;amp; DateItem,ClosureDateColumnItem"&amp;gt;" &amp;amp; DateItem)&lt;/P&gt;

&lt;P&gt;Merry Christmas and Happy Holidays!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Dec 2014 10:19:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169433#M48412</guid>
      <dc:creator>rus7am</dc:creator>
      <dc:date>2014-12-25T10:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to build timechart (?conditional)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169434#M48413</link>
      <description>&lt;P&gt;Give this a shot:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval duration = ClosureDate - OpenDate | concurrency duration=duration | timechart max(concurrency) as OpenTickets
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've assumed the dates are in epoch, if not you'll have to &lt;CODE&gt;strptime()&lt;/CODE&gt; them first.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Dec 2014 13:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169434#M48413</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-12-25T13:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to build timechart (?conditional)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169435#M48414</link>
      <description>&lt;P&gt;Hello, thanks for quick response!&lt;/P&gt;

&lt;P&gt;I've used following search:&lt;/P&gt;

&lt;P&gt;index=index_system sourcetype=system_tickets | dedup TicketNumber | eval OpenDate=strptime(OpenDate,"%Y-%m-%d") | replace - with "2014-12-27" in ClosureDate | eval ClosureDate=strptime(ClosureDate,"%Y-%m-%d") | eval duration = ClosureDate - OpenDate | concurrency duration=duration | timechart max(concurrency) as OpenTickets&lt;/P&gt;

&lt;P&gt;It was not successful.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://dc09ca52-a-62cb3a1a-s-sites.googlegroups.com/site/rabdullinfiles/splunk/Splunk%20Graph.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:32:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169435#M48414</guid>
      <dc:creator>rus7am</dc:creator>
      <dc:date>2020-09-28T18:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to build timechart (?conditional)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169436#M48415</link>
      <description>&lt;P&gt;Got more details than "not successful"?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Dec 2014 17:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169436#M48415</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-12-26T17:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to build timechart (?conditional)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169437#M48416</link>
      <description>&lt;P&gt;Hello Martin,&lt;/P&gt;

&lt;P&gt;Let me try to explain. Excel formulas works well, here is data after calculations to build the graph:&lt;/P&gt;

&lt;P&gt;Date    TicketTrend&lt;/P&gt;

&lt;P&gt;18.09.2014  2464&lt;BR /&gt;
23.09.2014  2175&lt;BR /&gt;
28.09.2014  2095&lt;BR /&gt;
03.10.2014  2616&lt;BR /&gt;
08.10.2014  2887&lt;BR /&gt;
13.10.2014  2769&lt;BR /&gt;
18.10.2014  3115&lt;BR /&gt;
23.10.2014  3292&lt;BR /&gt;
28.10.2014  3983&lt;BR /&gt;
02.11.2014  6458&lt;/P&gt;

&lt;P&gt;If i'm not mistaken Statistics tab in Splunk should have similar data, but:&lt;/P&gt;

&lt;P&gt;_time   OpenTickets&lt;BR /&gt;
2014-11-28  110&lt;BR /&gt;
2014-11-29   0&lt;BR /&gt;
2014-11-30   0&lt;BR /&gt;
2014-12-01  111&lt;BR /&gt;
2014-12-02   0&lt;BR /&gt;
2014-12-03  115&lt;BR /&gt;
2014-12-04  116&lt;BR /&gt;
2014-12-05   0&lt;BR /&gt;
2014-12-06   0&lt;BR /&gt;
2014-12-07   0&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jan 2015 10:23:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-build-timechart-conditional/m-p/169437#M48416</guid>
      <dc:creator>rus7am</dc:creator>
      <dc:date>2015-01-11T10:23:05Z</dc:date>
    </item>
  </channel>
</rss>

