<?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 How to search the count of a field's values in a comma delimited list and display it as a table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-s-values-in-a-comma-delimited/m-p/201587#M58394</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I have a serious problem. I'm trying to get the counts of all the values for a field in a comma delimited list, but seems Splunk only picks up the first value, so I cannot use stats count by Fieldname to show it directly.&lt;/P&gt;

&lt;P&gt;Part of the search is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;amp;fieldA=a,b,c,d&amp;amp;fieldB=a,b,c,d HTTP/1.1" 200 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I get all the counts for a, b, c, d and output the count in a table?&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;Field A&lt;BR /&gt;&lt;BR /&gt;
a    20&lt;BR /&gt;
b    22&lt;BR /&gt;
c     23&lt;BR /&gt;
d    24 &lt;/P&gt;

&lt;P&gt;Please suggest a search, thanks. &lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2016 16:23:55 GMT</pubDate>
    <dc:creator>heming277</dc:creator>
    <dc:date>2016-04-13T16:23:55Z</dc:date>
    <item>
      <title>How to search the count of a field's values in a comma delimited list and display it as a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-s-values-in-a-comma-delimited/m-p/201587#M58394</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I have a serious problem. I'm trying to get the counts of all the values for a field in a comma delimited list, but seems Splunk only picks up the first value, so I cannot use stats count by Fieldname to show it directly.&lt;/P&gt;

&lt;P&gt;Part of the search is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;amp;fieldA=a,b,c,d&amp;amp;fieldB=a,b,c,d HTTP/1.1" 200 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I get all the counts for a, b, c, d and output the count in a table?&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;Field A&lt;BR /&gt;&lt;BR /&gt;
a    20&lt;BR /&gt;
b    22&lt;BR /&gt;
c     23&lt;BR /&gt;
d    24 &lt;/P&gt;

&lt;P&gt;Please suggest a search, thanks. &lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 16:23:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-s-values-in-a-comma-delimited/m-p/201587#M58394</guid>
      <dc:creator>heming277</dc:creator>
      <dc:date>2016-04-13T16:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the count of a field's values in a comma delimited list and display it as a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-s-values-in-a-comma-delimited/m-p/201588#M58395</link>
      <description>&lt;P&gt;Try like this (assuming the field names are fixed, e.g. fieldA fieldB etc.)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex field=_raw "fieldA=(?&amp;lt;fieldA&amp;gt;[^&amp;amp;\s]+)" | makemv fieldA delim="," | stats count by fieldA
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Apr 2016 16:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-s-values-in-a-comma-delimited/m-p/201588#M58395</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-13T16:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the count of a field's values in a comma delimited list and display it as a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-s-values-in-a-comma-delimited/m-p/201589#M58396</link>
      <description>&lt;P&gt;thank you! it seems to work&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 18:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-the-count-of-a-field-s-values-in-a-comma-delimited/m-p/201589#M58396</guid>
      <dc:creator>heming277</dc:creator>
      <dc:date>2016-04-13T18:04:48Z</dc:date>
    </item>
  </channel>
</rss>

