<?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: Group results by rows and columns in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327276#M164595</link>
    <description>&lt;P&gt;something like this should help if added to the end:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...|eval{Stage}='count'|fields - Stage count|stats values(*) as * by Region Model&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2017 01:29:09 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2017-12-05T01:29:09Z</dc:date>
    <item>
      <title>Group results by rows and columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327274#M164593</link>
      <description>&lt;P&gt;I need some help grouping and transposing some data.  The search below gives me the data but now I want to group it and transpose one of the fields with it's data.&lt;BR /&gt;
....&lt;BR /&gt;
| stats count by Stage, Model,Region&lt;BR /&gt;
| table Region,Model,Stage,count&lt;BR /&gt;
| sort Region,Model,Stage&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Region | Model | Stage | count&lt;/STRONG&gt;&lt;BR /&gt;
East | Blue | Phase1 | 5&lt;BR /&gt;
East | Blue | Phase2 | 3&lt;BR /&gt;
East | Red | Phase1 | 2&lt;BR /&gt;
East | Red | Phase2 | 7&lt;BR /&gt;
West | Blue | Phase1 | 6&lt;BR /&gt;
West | Blue | Phase2 | 9&lt;BR /&gt;
West | Red | Phase1 | 7&lt;BR /&gt;
West | Red | Phase2 | 8&lt;/P&gt;

&lt;P&gt;I want it to look like&lt;BR /&gt;
&lt;STRONG&gt;Region | Model | Phase1 | Phase2&lt;/STRONG&gt; &lt;BR /&gt;
East | Blue | 5 | 3&lt;BR /&gt;
........| Red | 2 | 7&lt;BR /&gt;
West | Blue | 6 |9&lt;BR /&gt;
........ | Red | 7 | 8&lt;/P&gt;

&lt;P&gt;Sorry for my table formatting as I was sure how to do it nicely.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 23:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327274#M164593</guid>
      <dc:creator>kent_farries</dc:creator>
      <dc:date>2017-12-04T23:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Group results by rows and columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327275#M164594</link>
      <description>&lt;P&gt;Just add this to the bottom:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats list(*) AS * BY Region
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Dec 2017 23:16:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327275#M164594</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-04T23:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Group results by rows and columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327276#M164595</link>
      <description>&lt;P&gt;something like this should help if added to the end:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...|eval{Stage}='count'|fields - Stage count|stats values(*) as * by Region Model&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 01:29:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327276#M164595</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-12-05T01:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Group results by rows and columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327277#M164596</link>
      <description>&lt;P&gt;Thank you, that did the trick and saved me a bunch of time.  I will add this to my toolbox of SPL.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 16:28:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327277#M164596</guid>
      <dc:creator>kent_farries</dc:creator>
      <dc:date>2017-12-05T16:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Group results by rows and columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327278#M164597</link>
      <description>&lt;P&gt;Thanks for the suggestion, while this produced the results it did not transpose the columns.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 16:30:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Group-results-by-rows-and-columns/m-p/327278#M164597</guid>
      <dc:creator>kent_farries</dc:creator>
      <dc:date>2017-12-05T16:30:33Z</dc:date>
    </item>
  </channel>
</rss>

