<?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 display results grouping events by the field which is not part of event ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-results-grouping-events-by-the-field-which-is-not/m-p/290769#M87861</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;index=app  
| rename COMMENT as "for counting events by release, we only need the _time and a record type marker"
| eval rectype="detail"
| fields rectype

| rename COMMENT as "now we add the release records and sort them in front of any events on the same date"
| append [| inputlookup append=t ReleaseCalender.csv | table Release Production | rename Production as _time | eval rectype="deleteme"]
| sort 0 _time rectype

| rename COMMENT as "copy the Release onto all succeeding records until the next Release record, default nulls to zero."
| streamstats last(Release) as Release
| eval Release=coalesce(Release,"0")

| rename COMMENT as "kill the Release records then stats it up"
| search rectype="detail"
| stats count as Count by Release
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 16 Aug 2017 16:14:14 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-08-16T16:14:14Z</dc:date>
    <item>
      <title>How to display results grouping events by the field which is not part of event ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-results-grouping-events-by-the-field-which-is-not/m-p/290768#M87860</link>
      <description>&lt;P&gt;I have a lookup file with Release Number and Dates of Release.&lt;/P&gt;

&lt;P&gt;Below query lists me the count of events which occured during  release.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app  [|inputlookup ReleaseCalender.csv |sort Release ASC| reverse |streamstats current=f last(Production) as latest|rename Production as earliest| where Release="1"| table earliest, latest| convert mktime(*) timeformat="%d/%m/%Y"| format "" "" "" "" "" ""| rex field=search mode=sed "s/\"//g"] | stats count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is it possible to group the number of events by Release field, which is not part of events at all - but has the timestart and timeend for grouping ? Something like below result&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Release Count
1 100
2 50
3 200
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 05:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-results-grouping-events-by-the-field-which-is-not/m-p/290768#M87860</guid>
      <dc:creator>sangs8788</dc:creator>
      <dc:date>2017-08-16T05:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to display results grouping events by the field which is not part of event ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-results-grouping-events-by-the-field-which-is-not/m-p/290769#M87861</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=app  
| rename COMMENT as "for counting events by release, we only need the _time and a record type marker"
| eval rectype="detail"
| fields rectype

| rename COMMENT as "now we add the release records and sort them in front of any events on the same date"
| append [| inputlookup append=t ReleaseCalender.csv | table Release Production | rename Production as _time | eval rectype="deleteme"]
| sort 0 _time rectype

| rename COMMENT as "copy the Release onto all succeeding records until the next Release record, default nulls to zero."
| streamstats last(Release) as Release
| eval Release=coalesce(Release,"0")

| rename COMMENT as "kill the Release records then stats it up"
| search rectype="detail"
| stats count as Count by Release
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Aug 2017 16:14:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-results-grouping-events-by-the-field-which-is-not/m-p/290769#M87861</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-16T16:14:14Z</dc:date>
    </item>
  </channel>
</rss>

