<?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 how to take the values from nth field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145565#M40590</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;
Below is my search...&lt;BR /&gt;
source="computer_status_export_SEP12_Mar27.csv" | dedup "Computer Name","MAC Address1" | timechart count("Last time status changed") as count span=1d | sort - _time&lt;/P&gt;

&lt;P&gt;_time↕     count↕ &lt;/P&gt;

&lt;P&gt;2014-03-27  24&lt;BR /&gt;&lt;BR /&gt;
2014-03-26  21790&lt;BR /&gt;&lt;BR /&gt;
2014-03-25  32439&lt;BR /&gt;&lt;BR /&gt;
2014-03-24  4017&lt;BR /&gt;&lt;BR /&gt;
2014-03-23  1336&lt;BR /&gt;&lt;BR /&gt;
2014-03-22  334&lt;BR /&gt;&lt;BR /&gt;
2014-03-21  441&lt;BR /&gt;&lt;BR /&gt;
2014-03-20  1540&lt;BR /&gt;&lt;BR /&gt;
2014-03-19  1134&lt;BR /&gt;&lt;BR /&gt;
2014-03-18  1874&lt;BR /&gt;&lt;BR /&gt;
2014-03-17  1363&lt;BR /&gt;&lt;BR /&gt;
2014-03-16  760&lt;BR /&gt;&lt;BR /&gt;
2014-03-15  261&lt;BR /&gt;&lt;BR /&gt;
2014-03-14  253&lt;BR /&gt;&lt;BR /&gt;
2014-03-13  698&lt;BR /&gt;&lt;BR /&gt;
2014-03-12  684&lt;BR /&gt;&lt;BR /&gt;
2014-03-11  541&lt;BR /&gt;&lt;BR /&gt;
2014-03-10  473&lt;BR /&gt;&lt;BR /&gt;
2014-03-09  425&lt;BR /&gt;&lt;BR /&gt;
Now what I want to do is I want add the count after 10 values it means from 2014-03-17 to ending so please help me.........&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:29:24 GMT</pubDate>
    <dc:creator>thambisetty</dc:creator>
    <dc:date>2020-09-28T16:29:24Z</dc:date>
    <item>
      <title>how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145565#M40590</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
Below is my search...&lt;BR /&gt;
source="computer_status_export_SEP12_Mar27.csv" | dedup "Computer Name","MAC Address1" | timechart count("Last time status changed") as count span=1d | sort - _time&lt;/P&gt;

&lt;P&gt;_time↕     count↕ &lt;/P&gt;

&lt;P&gt;2014-03-27  24&lt;BR /&gt;&lt;BR /&gt;
2014-03-26  21790&lt;BR /&gt;&lt;BR /&gt;
2014-03-25  32439&lt;BR /&gt;&lt;BR /&gt;
2014-03-24  4017&lt;BR /&gt;&lt;BR /&gt;
2014-03-23  1336&lt;BR /&gt;&lt;BR /&gt;
2014-03-22  334&lt;BR /&gt;&lt;BR /&gt;
2014-03-21  441&lt;BR /&gt;&lt;BR /&gt;
2014-03-20  1540&lt;BR /&gt;&lt;BR /&gt;
2014-03-19  1134&lt;BR /&gt;&lt;BR /&gt;
2014-03-18  1874&lt;BR /&gt;&lt;BR /&gt;
2014-03-17  1363&lt;BR /&gt;&lt;BR /&gt;
2014-03-16  760&lt;BR /&gt;&lt;BR /&gt;
2014-03-15  261&lt;BR /&gt;&lt;BR /&gt;
2014-03-14  253&lt;BR /&gt;&lt;BR /&gt;
2014-03-13  698&lt;BR /&gt;&lt;BR /&gt;
2014-03-12  684&lt;BR /&gt;&lt;BR /&gt;
2014-03-11  541&lt;BR /&gt;&lt;BR /&gt;
2014-03-10  473&lt;BR /&gt;&lt;BR /&gt;
2014-03-09  425&lt;BR /&gt;&lt;BR /&gt;
Now what I want to do is I want add the count after 10 values it means from 2014-03-17 to ending so please help me.........&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:29:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145565#M40590</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-09-28T16:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145566#M40591</link>
      <description>&lt;P&gt;You could set your timerange accordingly to only search from March 17th and on.&lt;/P&gt;

&lt;P&gt;Alternatively, you can add this to the end of your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | head 11 | stats sum(count)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will take the first eleven rows, March 27th to March 17th, and sum up their counts.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 11:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145566#M40591</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-29T11:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145567#M40592</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="computer_status_export_SEP12_Mar27.csv" | dedup "Computer Name","MAC Address1" | timechart count("Last time status changed") as count span=1d | sort - _time | streamstats count as sno | eval sno=if(sno&amp;gt;10,11,sno) | stats first(_time) as _time sum(count) as count by sno | fields - sno
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Apr 2014 13:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145567#M40592</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-29T13:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145568#M40593</link>
      <description>&lt;P&gt;that is search for first 10 values right......?&lt;BR /&gt;
i want to combine after 10 to last value....i dont want first 10 ok&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 16:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145568#M40593</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2014-04-29T16:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145569#M40594</link>
      <description>&lt;P&gt;and one more thing can write the code like below..&lt;BR /&gt;
if(sno&amp;gt;=4,stats sum(count),if(sno&amp;gt;=5 and sno&amp;lt;=10),stats sum(count),if(sno&amp;gt;=11),stats sum(count))....&lt;BR /&gt;
i think this should be understood by you please help me............&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 16:30:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145569#M40594</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2014-04-29T16:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145570#M40595</link>
      <description>&lt;P&gt;You want commulative sum after 10th value? If possible provide the expected output from the sample data you've shared. &lt;/P&gt;

&lt;P&gt;You cant have syntax you mentioned in previous comment, but if you can tell your requirement with expected output, there may be some workarounds to get that.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 19:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145570#M40595</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-29T19:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145571#M40596</link>
      <description>&lt;P&gt;if the above two suggestions are not okay for you, they use a where clause to have the dates greater than 17th!! why bother about all the top 11 records or 11th record!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 20:14:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145571#M40596</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-29T20:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145572#M40597</link>
      <description>&lt;P&gt;as i mentioned in the above...&lt;BR /&gt;
_time↕     count↕ &lt;/P&gt;

&lt;P&gt;2014-03-27  24&lt;/P&gt;

&lt;P&gt;2014-03-26  21790&lt;/P&gt;

&lt;P&gt;2014-03-25  32439&lt;/P&gt;

&lt;P&gt;2014-03-24  4017&lt;/P&gt;

&lt;P&gt;2014-03-23  1336&lt;/P&gt;

&lt;P&gt;2014-03-22  334&lt;/P&gt;

&lt;P&gt;2014-03-21  441&lt;/P&gt;

&lt;P&gt;2014-03-20  1540&lt;/P&gt;

&lt;P&gt;2014-03-19  1134&lt;/P&gt;

&lt;P&gt;2014-03-18  1874&lt;/P&gt;

&lt;P&gt;2014-03-11  541&lt;BR /&gt;
i want to genarate report for first 4 days one group1,after 6 days group2,rest of as group3..&lt;BR /&gt;
Expected Output:&lt;/P&gt;

&lt;H2&gt;Signature_Status           Count&lt;/H2&gt;

&lt;P&gt;Signature &amp;lt;=4             count1(first 4days count)&lt;BR /&gt;
Signature &amp;gt;=5 and &amp;lt;=10    count2(next 6 days count)&lt;BR /&gt;
Signature &amp;gt;=11            count3(rest of days count)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 15:27:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145572#M40597</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2014-04-30T15:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145573#M40598</link>
      <description>&lt;P&gt;The output which i Mentioned in the above is for only one day(2014-03-27).&lt;BR /&gt;
Now my question is i want to make the trend for before 10 days including today also..it means today(30/04/2014) to 21/04/2014---(from today to past 10 days)..&lt;BR /&gt;
Expected Output:&lt;BR /&gt;
Date     Signature&amp;lt;=4 "Signature&amp;gt;=5and&amp;lt;=10" "Signature&amp;gt;=11" &lt;BR /&gt;
2014-04-30  100             200                500&lt;BR /&gt;
29&lt;BR /&gt;
28&lt;BR /&gt;
27&lt;BR /&gt;
26&lt;BR /&gt;
25&lt;BR /&gt;
24&lt;BR /&gt;
23&lt;BR /&gt;
22&lt;BR /&gt;
21&lt;/P&gt;

&lt;P&gt;so i can make the trend....for the computer status report(this is the file where we store the status of computer details of entire domain)..&lt;BR /&gt;
please help me................&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 15:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145573#M40598</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2014-04-30T15:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to take the values from nth field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145574#M40599</link>
      <description>&lt;P&gt;Just to be sure, The output should be like this&lt;/P&gt;

&lt;P&gt;Date##Signature&amp;lt;=4##Signature&amp;gt;=5and&amp;lt;=10##Signature&amp;gt;=11 &lt;BR /&gt;
04-30##Count(04-30 to 04-27)##Count(04-26 to 04-22)##Count(before 04-22)&lt;/P&gt;

&lt;P&gt;This should be done for just today or for every day, get data for past 5, 6-10 and before 10 days? Signature is a field in your logs?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 15:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-take-the-values-from-nth-field/m-p/145574#M40599</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-30T15:43:31Z</dc:date>
    </item>
  </channel>
</rss>

