<?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: grouping field data and count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659989#M227841</link>
    <description>&lt;P&gt;Can you provide an example of what that would look like?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 14:32:36 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-10-06T14:32:36Z</dc:date>
    <item>
      <title>grouping field data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659627#M227738</link>
      <description>&lt;P&gt;I have data like provided below:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;field A&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Field B&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Field C&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Field D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="77px"&gt;abc.com&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="114px"&gt;xyz.com&lt;/TD&gt;&lt;TD width="25%" height="114px"&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="114px"&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="114px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="77px"&gt;abc.com&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;AB&amp;nbsp;&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="77px"&gt;xyz.com&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="77px"&gt;def.com&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="25%" height="77px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to group Field A values such that all abc.com value come in 1 row with associated count.&lt;/P&gt;&lt;P&gt;I want output like&lt;/P&gt;&lt;TABLE border="1" width="582px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="72.7422px" height="25px"&gt;field A&lt;/TD&gt;&lt;TD width="72.6484px"&gt;count&lt;/TD&gt;&lt;TD width="145.195px" height="25px"&gt;Field B&lt;/TD&gt;&lt;TD width="145.195px" height="25px"&gt;Field C&lt;/TD&gt;&lt;TD width="145.219px" height="25px"&gt;Field D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="72.7422px" height="77px"&gt;abc.com&lt;/TD&gt;&lt;TD width="72.6484px"&gt;2&lt;/TD&gt;&lt;TD width="145.195px" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD width="145.195px" height="77px"&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="145.219px" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="72.7422px" height="114px"&gt;xyz.com&lt;/TD&gt;&lt;TD width="72.6484px"&gt;2&lt;/TD&gt;&lt;TD width="145.195px" height="114px"&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="145.195px" height="114px"&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="145.219px" height="114px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="72.7422px" height="77px"&gt;def.com&lt;/TD&gt;&lt;TD width="72.6484px"&gt;1&lt;/TD&gt;&lt;TD width="145.195px" height="77px"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD width="145.195px" height="77px"&gt;&lt;P&gt;AB&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/TD&gt;&lt;TD width="145.219px" height="77px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I take path of stats count then it split field C and D which I don't want, I want them to be uniquely compared as a group value. looking for suggestions. Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 09:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659627#M227738</guid>
      <dc:creator>ritzz</dc:creator>
      <dc:date>2023-10-04T09:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: grouping field data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659630#M227739</link>
      <description>&lt;LI-CODE lang="markup"&gt;| nomv FieldB
| nomv FieldC
| nomv FieldD
| stats count values(*) as * by FieldA
| foreach FieldB FieldC FieldD
    [| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=split(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,"
")]&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Oct 2023 10:18:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659630#M227739</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-04T10:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: grouping field data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659983#M227837</link>
      <description>&lt;P&gt;Thanks ! your provided answer worked.&lt;/P&gt;
&lt;P&gt;Additionally, explaining for others coming here.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| nomv FieldB     —- multivalue command to convert multivalued field to a single value field

| nomv FieldC      

| nomv FieldD

| stats count values(*) as * by FieldA     —to get count of field values

| foreach FieldB FieldC FieldD             

    [| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=split(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,"

")]. —-  for every MV field converted to singlevalue field , converting them back  to multivalue fields&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 06 Oct 2023 14:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659983#M227837</guid>
      <dc:creator>ritzz</dc:creator>
      <dc:date>2023-10-06T14:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: grouping field data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659987#M227840</link>
      <description>&lt;P&gt;after performing the query&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;base search |  nomv FieldB | nomv FieldC|  nomv FieldD | stats count values(*) as * by FieldA | foreach FieldB,FieldC FieldD [| eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=split(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,"")] &lt;/LI-CODE&gt;
&lt;P&gt;my result table is like below&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;field A&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;count&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;Field c&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;Field D&lt;/TD&gt;
&lt;TD width="10%" height="25px"&gt;Field E&lt;/TD&gt;
&lt;TD width="10%" height="25px"&gt;Field F&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="114px"&gt;abc.com&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;2&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;
&lt;P&gt;a&lt;/P&gt;
&lt;P&gt;b&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="10%" height="114px"&gt;
&lt;P&gt;abc.com&lt;/P&gt;
&lt;P&gt;bcf.com&lt;/P&gt;
&lt;P&gt;def.com&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="10%" height="114px"&gt;
&lt;P&gt;sub1&lt;/P&gt;
&lt;P&gt;sub 2&lt;/P&gt;
&lt;P&gt;sub 3&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="114px"&gt;def.com&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;4&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="10%" height="114px"&gt;
&lt;P&gt;bcc.com&lt;/P&gt;
&lt;P&gt;xyz.com&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="10%" height="114px"&gt;
&lt;P&gt;sub 5&lt;/P&gt;
&lt;P&gt;sub 6&lt;/P&gt;
&lt;P&gt;sub 6&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="114px"&gt;efg.com&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;6&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="20%" height="114px"&gt;
&lt;P&gt;A&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;B&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="10%" height="114px"&gt;
&lt;P&gt;jhg.com&lt;/P&gt;
&lt;P&gt;abc.com&lt;/P&gt;
&lt;P&gt;ghj.com&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="10%" height="114px"&gt;
&lt;P&gt;sub 4&lt;/P&gt;
&lt;P&gt;sub 7&lt;/P&gt;
&lt;P&gt;sub 8&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to&amp;nbsp; ask is their anyway/operation&amp;nbsp; &amp;nbsp;that I can perform on field E and field F so that they are throwing unique combination value rather a multivalue filed.&amp;nbsp; Prior performing count operation in query Field E and F are unique but after count they become multi value which In later stage again I want to tke them to their prior state.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;such that where field A,B,C,D remains same but Field E &amp;amp; F are divided further in rows on basis of unique combination of values of field E &amp;amp; F ( but parent unique combination of A,B,C,D remains same)&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 15:51:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659987#M227840</guid>
      <dc:creator>ritzz</dc:creator>
      <dc:date>2023-10-06T15:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: grouping field data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659989#M227841</link>
      <description>&lt;P&gt;Can you provide an example of what that would look like?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 14:32:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/659989#M227841</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-06T14:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: grouping field data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/660177#M227885</link>
      <description>&lt;P&gt;something like below where Field A,count,B,C are multivalue existing&amp;nbsp; already calculated fields but additionally Field E and F are divided based on domain ( pre calculation we did in last query) but in domain signifying their unique combination values.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-09 at 22.01.45.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27501i7A3C749F1E76216B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-10-09 at 22.01.45.png" alt="Screenshot 2023-10-09 at 22.01.45.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 20:04:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/660177#M227885</guid>
      <dc:creator>ritzz</dc:creator>
      <dc:date>2023-10-09T20:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: grouping field data and count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/660205#M227895</link>
      <description>&lt;P&gt;Yeah, you can't do that. Each "row" is an event, a stats event. You can't split the event part way through. You would need to create a new event e.g.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_0-1696922552388.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27503i88072CE4E1E38B3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_0-1696922552388.png" alt="ITWhisperer_0-1696922552388.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;would become&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_1-1696922593323.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27504i7F32A3CAF89CC294/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_1-1696922593323.png" alt="ITWhisperer_1-1696922593323.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 07:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-field-data-and-count/m-p/660205#M227895</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-10T07:23:31Z</dc:date>
    </item>
  </channel>
</rss>

