<?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 Help with stats table output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-table-output/m-p/360666#M106607</link>
    <description>&lt;P&gt;I have a dataset that can be represented as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Region=A State=1 City=a Product=Apple
Region=A State=1 City=b Product=Apple
Region=A State=1 City=c Product=Orange
Region=B State=1 City=d Product=Pineapple
Region=B State=2 City=e Product=Apple
Region=C State=1 City=f Product=Orange
Region=C State=2 City=g Product=Orange
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I summarize by Region and State have a stats output table as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Region  |  State  | Apple  |  Orange  |  Pineapple
   A    |   1     |    2   |     0    |     0
   B    |   1     |    0   |     1    |     1
   B    |   2     |    1   |     0    |     0
   C    |   1     |    0   |     1    |     0
   C    |   2     |    0   |     1    |     0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 28 Sep 2017 09:34:43 GMT</pubDate>
    <dc:creator>adlireza</dc:creator>
    <dc:date>2017-09-28T09:34:43Z</dc:date>
    <item>
      <title>Help with stats table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-table-output/m-p/360666#M106607</link>
      <description>&lt;P&gt;I have a dataset that can be represented as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Region=A State=1 City=a Product=Apple
Region=A State=1 City=b Product=Apple
Region=A State=1 City=c Product=Orange
Region=B State=1 City=d Product=Pineapple
Region=B State=2 City=e Product=Apple
Region=C State=1 City=f Product=Orange
Region=C State=2 City=g Product=Orange
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I summarize by Region and State have a stats output table as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Region  |  State  | Apple  |  Orange  |  Pineapple
   A    |   1     |    2   |     0    |     0
   B    |   1     |    0   |     1    |     1
   B    |   2     |    1   |     0    |     0
   C    |   1     |    0   |     1    |     0
   C    |   2     |    0   |     1    |     0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Sep 2017 09:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-table-output/m-p/360666#M106607</guid>
      <dc:creator>adlireza</dc:creator>
      <dc:date>2017-09-28T09:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with stats table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-table-output/m-p/360667#M106608</link>
      <description>&lt;P&gt;Try this!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (your search)   |stats 
count(eval(Product="Apple") as Apple,
count(eval(Product="Orange") as Orange,
count(eval(Product="Pineapple") as Pineapple, by Region,State
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;※Field extraction is required.&lt;BR /&gt;
Region,State,Product&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 10:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-table-output/m-p/360667#M106608</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2017-09-28T10:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with stats table output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-table-output/m-p/360668#M106609</link>
      <description>&lt;P&gt;It's missing a few round brackets, but this is the answer that helped me, thanks. &lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 10:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-table-output/m-p/360668#M106609</guid>
      <dc:creator>adlireza</dc:creator>
      <dc:date>2017-10-02T10:15:52Z</dc:date>
    </item>
  </channel>
</rss>

