<?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: stats count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-count/m-p/666266#M228564</link>
    <description>&lt;P&gt;Perfect!&amp;nbsp; exactly what I was after.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2023 00:35:19 GMT</pubDate>
    <dc:creator>splunk_novice99</dc:creator>
    <dc:date>2023-10-26T00:35:19Z</dc:date>
    <item>
      <title>stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count/m-p/666261#M228561</link>
      <description>&lt;P&gt;Hello again splunk experts&lt;/P&gt;&lt;P&gt;This is my current situation:-&lt;/P&gt;&lt;P&gt;&lt;U&gt;job_no&amp;nbsp;&lt;/U&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;field4&lt;/U&gt;&lt;BR /&gt;131&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string1&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string2&lt;/P&gt;&lt;P&gt;132&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string3&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string4&lt;BR /&gt;&lt;BR /&gt;|table job_no, field2, field4|dedup, job_no, field2&lt;BR /&gt;|stats count dc(field4) AS dc_field4 by job_no&lt;BR /&gt;|eval calc=dc_field4 * count&lt;/P&gt;&lt;P&gt;produces:-&lt;/P&gt;&lt;P&gt;job_no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc_field4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; calc&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="42px" height="24px"&gt;131&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;6&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;2&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="42px" height="24px"&gt;132&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;6&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;2&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This all works fine.&amp;nbsp; The problem is that I also want to include the strings (string1,string2,string3,string4) in my table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like this:-&lt;/P&gt;&lt;P&gt;job_no&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dc_field4&amp;nbsp; &amp;nbsp; &amp;nbsp;calc&lt;/P&gt;&lt;TABLE width="750"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="160px" height="24px"&gt;131&lt;/TD&gt;&lt;TD width="160px"&gt;string1, string2&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;6&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;2&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="160px" height="24px"&gt;132&lt;/TD&gt;&lt;TD width="160px"&gt;string3, string4&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;6&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;2&lt;/TD&gt;&lt;TD width="40px" height="24px"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated,&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 22:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count/m-p/666261#M228561</guid>
      <dc:creator>splunk_novice99</dc:creator>
      <dc:date>2023-10-25T22:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count/m-p/666264#M228563</link>
      <description>&lt;P&gt;Tell the &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command you want the values of field4.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|fields job_no, field2, field4
|dedup job_no, field2
|stats count, dc(field4) AS dc_field4, values(field4) as field4 by job_no
|eval calc=dc_field4 * count
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 00:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count/m-p/666264#M228563</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-10-26T00:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count/m-p/666266#M228564</link>
      <description>&lt;P&gt;Perfect!&amp;nbsp; exactly what I was after.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 00:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count/m-p/666266#M228564</guid>
      <dc:creator>splunk_novice99</dc:creator>
      <dc:date>2023-10-26T00:35:19Z</dc:date>
    </item>
  </channel>
</rss>

