<?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: Multivalue fields- Count Values that match a value in multi value field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374250#M109992</link>
    <description>&lt;P&gt;Hi Woodcock! For the above table.Question1) find the count of all intents that do not have at least  1 value for the column  CASE as WDC&lt;BR /&gt;&lt;BR /&gt;
Answer1) I would like the value as 0 for the intent -Out of the 4 tuples, all of the them have alteast  one  of the CASE Column value as WDC- . &lt;BR /&gt;
2nd Question)Find out count of all intents that match atleast one occurrence of  CCC in Case field .&lt;BR /&gt;
I would like the value as 1. Out of the 4 tuples, only one of  them have the values as CCC for the column Case( 2nd record)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Column Case has multiple values for each record of intent&lt;/STRONG&gt;&lt;STRONG&gt;Each of the values in the column CASE are alphanumeric. Have to search by prefix i.e. WDC or CCC&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 May 2018 20:24:30 GMT</pubDate>
    <dc:creator>venkatrajan04</dc:creator>
    <dc:date>2018-05-02T20:24:30Z</dc:date>
    <item>
      <title>Multivalue fields- Count Values that match a value in multi value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374248#M109990</link>
      <description>&lt;P&gt;Hello SPlunk team,&lt;BR /&gt;
my base query returns something like the table below . I need to find the count of all intents  that do not have the values for case column  as WDC and also find out count of all intents that  match CCC in  Case field . Note- case field is a multi value field. &lt;BR /&gt;
ID | Intent| Case&lt;BR /&gt;
111|reading|WDC-333&lt;BR /&gt;
122|reading|WDC-345,CCC-666,I -888&lt;BR /&gt;
123|reading|WDC-567,I-444&lt;BR /&gt;
155|reading|WDC-43, S-888,B-999&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 19:42:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374248#M109990</guid>
      <dc:creator>venkatrajan04</dc:creator>
      <dc:date>2018-05-02T19:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multivalue fields- Count Values that match a value in multi value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374249#M109991</link>
      <description>&lt;P&gt;Give us a mockup of what you would like your final output data to be.  I don't get it at all.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 20:13:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374249#M109991</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-02T20:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multivalue fields- Count Values that match a value in multi value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374250#M109992</link>
      <description>&lt;P&gt;Hi Woodcock! For the above table.Question1) find the count of all intents that do not have at least  1 value for the column  CASE as WDC&lt;BR /&gt;&lt;BR /&gt;
Answer1) I would like the value as 0 for the intent -Out of the 4 tuples, all of the them have alteast  one  of the CASE Column value as WDC- . &lt;BR /&gt;
2nd Question)Find out count of all intents that match atleast one occurrence of  CCC in Case field .&lt;BR /&gt;
I would like the value as 1. Out of the 4 tuples, only one of  them have the values as CCC for the column Case( 2nd record)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Column Case has multiple values for each record of intent&lt;/STRONG&gt;&lt;STRONG&gt;Each of the values in the column CASE are alphanumeric. Have to search by prefix i.e. WDC or CCC&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 20:24:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374250#M109992</guid>
      <dc:creator>venkatrajan04</dc:creator>
      <dc:date>2018-05-02T20:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Multivalue fields- Count Values that match a value in multi value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374251#M109993</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults | eval raw="111|reading|WDC-333:122|reading|WDC-345,CCC-666,I-888:123|reading|WDC-567,I-444:155|reading|WDC-43, S-888,B-999"
| makemv delim=":" raw
| mvexpand raw
| rename raw AS _raw
| rex "^(?&amp;lt;ID&amp;gt;[^\|]+)\|(?&amp;lt;Intent&amp;gt;[^\|]+)\|(?&amp;lt;Case&amp;gt;[^\|]+)$"
| makemv delim="," Case
| table ID Intent Case

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution."

| eval CasePrefix = Case
| rex field=CasePrefix mode=sed "s/-\d+$//"
| chart count BY ID CasePrefix
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 May 2018 20:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374251#M109993</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-02T20:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Multivalue fields- Count Values that match a value in multi value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374252#M109994</link>
      <description>&lt;P&gt;Thanks WoodcocK! What exactly does the sed command do ? &lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 20:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374252#M109994</guid>
      <dc:creator>venkatrajan04</dc:creator>
      <dc:date>2018-05-02T20:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multivalue fields- Count Values that match a value in multi value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374253#M109995</link>
      <description>&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/Sed"&gt;https://en.wikipedia.org/wiki/Sed&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 21:09:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multivalue-fields-Count-Values-that-match-a-value-in-multi-value/m-p/374253#M109995</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-02T21:09:32Z</dc:date>
    </item>
  </channel>
</rss>

