<?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 Splunk comparison search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403234#M116677</link>
    <description>&lt;P&gt;Hello, &lt;BR /&gt;
I have difficulties with creating a comparison chart for the next data structure:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search         Count              Date
_________________________________________
check1           5             07/5/2019       
check2           3             07/5/2019
check3           6             07/5/2019
check1           7             07/6/2019
check2           12            07/6/2019
check3           2             07/6/2019                         
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is an example for the structure. There can be more dates. &lt;/P&gt;

&lt;P&gt;What i am trying to achieve is a line chart by search, that every line will represent a search and there will be a time line by the date value. &lt;/P&gt;

&lt;P&gt;To be clearer, the X axis will be the date, and the y axis will be the count. &lt;/P&gt;

&lt;P&gt;Can anyone assist me with this ? &lt;/P&gt;

&lt;P&gt;The data is coming from  a lookup file.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2019 11:37:50 GMT</pubDate>
    <dc:creator>astatrial</dc:creator>
    <dc:date>2019-07-22T11:37:50Z</dc:date>
    <item>
      <title>Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403234#M116677</link>
      <description>&lt;P&gt;Hello, &lt;BR /&gt;
I have difficulties with creating a comparison chart for the next data structure:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search         Count              Date
_________________________________________
check1           5             07/5/2019       
check2           3             07/5/2019
check3           6             07/5/2019
check1           7             07/6/2019
check2           12            07/6/2019
check3           2             07/6/2019                         
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is an example for the structure. There can be more dates. &lt;/P&gt;

&lt;P&gt;What i am trying to achieve is a line chart by search, that every line will represent a search and there will be a time line by the date value. &lt;/P&gt;

&lt;P&gt;To be clearer, the X axis will be the date, and the y axis will be the count. &lt;/P&gt;

&lt;P&gt;Can anyone assist me with this ? &lt;/P&gt;

&lt;P&gt;The data is coming from  a lookup file.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 11:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403234#M116677</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-22T11:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403235#M116678</link>
      <description>&lt;P&gt;try this anywhere:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1
| eval data = "check1,5,07/5/2019;;;check2,3,07/5/2019;;;check3,6,07/5/2019;;;check1,7,07/6/2019;;;check2,12,07/6/2019;;;check3,2,07/6/2019"
| makemv delim=";;;" data
| mvexpand data
| rex field=data "(?&amp;lt;search&amp;gt;[^\,]+)\,(?&amp;lt;COUNT&amp;gt;\d+)\,(?&amp;lt;Date&amp;gt;.+)"
| eval _time = strptime(Date, "%m/%d/%Y")
| rename COMMENT as "the above generates data below is the solution"
| timechart span=1d max(COUNT) as max_count by search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;work with the formula&lt;BR /&gt;
hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 11:55:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403235#M116678</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-07-22T11:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403236#M116679</link>
      <description>&lt;P&gt;Your solution is a bit problematic, because the number of searches is changing. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 12:44:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403236#M116679</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-22T12:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403237#M116680</link>
      <description>&lt;P&gt;how come? the split with &lt;CODE&gt;by&lt;/CODE&gt; clause will take as many searches under that field&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 12:50:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403237#M116680</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-07-22T12:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403238#M116681</link>
      <description>&lt;P&gt;I don't see split with by. &lt;BR /&gt;
But maybe you can help me with another idea i had. &lt;BR /&gt;
Instead of this, i want to calculate the difference between the two most recent searches by search.&lt;BR /&gt;
So if i had another date of 7/7/2019 it would calculate the difference between every count value of every search between the 7/7/2019 and the 7/6/2019&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 13:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403238#M116681</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-22T13:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403239#M116682</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1
| eval data = "check1,5,07/5/2019;;;check2,3,07/5/2019;;;check3,6,07/5/2019;;;check1,7,07/6/2019;;;check2,12,07/6/2019;;;check3,2,07/6/2019;;;check1,15,07/7/2019;;;check2,13,07/7/2019;;;check3,26,07/7/2019;;;check1,17,07/8/2019;;;check2,22,07/8/2019;;;check3,9,07/8/2019"
| makemv delim=";;;" data
| mvexpand data
| rex field=data "(?&amp;lt;search&amp;gt;[^\,]+)\,(?&amp;lt;COUNT&amp;gt;\d+)\,(?&amp;lt;Date&amp;gt;.+)"
| eval _time = strptime(Date, "%m/%d/%Y")
| rename COMMENT as "the above generates data below is the solution"
| streamstats current=f global=false window=2 last(COUNT) as previous_count by search
| eval delta = COUNT - previous_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 13:34:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403239#M116682</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-07-22T13:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403240#M116683</link>
      <description>&lt;P&gt;Thanks for your help, &lt;BR /&gt;
I understand now what you have tried to do in the first solution. &lt;BR /&gt;
It doesn't work for some reason. &lt;BR /&gt;
The second solution worked fine, but i need only the last date rows (max date). I will try to solve it, but if you know how to do it, that will be great. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 18:54:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403240#M116683</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-22T18:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk comparison search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403241#M116684</link>
      <description>&lt;P&gt;I added this to the second solution eventually - &lt;BR /&gt;
    | eventstats max(date) as date&lt;BR /&gt;
    | where date = maxdate&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 19:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-comparison-search/m-p/403241#M116684</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-22T19:01:11Z</dc:date>
    </item>
  </channel>
</rss>

