<?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: Query Help: Sorting Results by Group in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130063#M35394</link>
    <description>&lt;P&gt;search |sort group|bucket _time span=1d |chart count by _time,project,group&lt;/P&gt;

&lt;P&gt;moreover you can also use stats and make a table of your choice to show on dashboard.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2014 20:45:20 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2014-01-29T20:45:20Z</dc:date>
    <item>
      <title>Query Help: Sorting Results by Group</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130060#M35391</link>
      <description>&lt;P&gt;I have a search that gives me the date and total number of projects:&lt;/P&gt;

&lt;P&gt;index=eis_continuous_integration sourcetype=eisci &lt;BR /&gt;
| timechart span=1d count as projectTypes by SRCProject&lt;BR /&gt;
| rename _time as Date &lt;BR /&gt;
|convert timeformat="%m/%d/%Y" ctime(Date)&lt;/P&gt;

&lt;P&gt;How can I make it so the results are also sorted by Group ( Group is a field extracted in which its values are ESB, CG, and EG).  I'd like to make it so the chart displays a break down of each group by project.  When I use ...| timechart span=1d count as projectTypes by SRCProject, Group, Splunk sees ", Group" as an invalid argument.&lt;/P&gt;

&lt;P&gt;Do you know how I could modify this query to display the results I'm looking for?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:45:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130060#M35391</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2020-09-28T15:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Query Help: Sorting Results by Group</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130061#M35392</link>
      <description>&lt;P&gt;Timechart only accepts one 'by' field. You wouldn't be able to timechart your results. If you just want a table of results then use stats and you can use as many fields as you want in your 'by'. Then simply add a pipe to a 'sort' to list the fields in decreasing priority how you would like them sorted.&lt;/P&gt;

&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 19:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130061#M35392</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2014-01-29T19:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Query Help: Sorting Results by Group</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130062#M35393</link>
      <description>&lt;P&gt;As @aholzer points out, &lt;CODE&gt;timechart&lt;/CODE&gt; can have only 1 field after the &lt;CODE&gt;by&lt;/CODE&gt;. However, if you want a table, you could do it this way&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=eis_continuous_integration sourcetype=eisci 
| bucket span=1d  _time  as Date
| stats count as projectTypes by Date SRCProject Group
| eval Date = strftime(Date, ""%m/%d/%Y"")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another alternative is this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=eis_continuous_integration sourcetype=eisci 
| eval ProjectGroup = SRCProject . "  -  " . Group
| timechart span=1d count as projectTypes by ProjectGroup
| rename _time as Date 
| convert timeformat="%m/%d/%Y" ctime(Date)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jan 2014 20:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130062#M35393</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-01-29T20:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query Help: Sorting Results by Group</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130063#M35394</link>
      <description>&lt;P&gt;search |sort group|bucket _time span=1d |chart count by _time,project,group&lt;/P&gt;

&lt;P&gt;moreover you can also use stats and make a table of your choice to show on dashboard.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 20:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130063#M35394</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-01-29T20:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query Help: Sorting Results by Group</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130064#M35395</link>
      <description>&lt;P&gt;Thanks all!  I like index=eis_continuous_integration sourcetype=eisci &lt;BR /&gt;
|search Group="EG"&lt;BR /&gt;
| bucket span=1d  _time  as Date&lt;BR /&gt;
| stats count as totalTypes by Date, SRCProject, Group&lt;BR /&gt;
| eval Date = strftime(Date, "%m/%d/%Y")&lt;/P&gt;

&lt;P&gt;How can I modify this so in the chart in stead of "Group", It shows "EG" as a header, and the value "30" under it.  Is that possible?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130064#M35395</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2020-09-28T15:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Query Help: Sorting Results by Group</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130065#M35396</link>
      <description>&lt;P&gt;Maybe a chart with Date, SRCProject,EG,ESB,CG as headers and the values underneath?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 21:17:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-Help-Sorting-Results-by-Group/m-p/130065#M35396</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2014-01-29T21:17:58Z</dc:date>
    </item>
  </channel>
</rss>

