<?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 mvcount by value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/mvcount-by-value/m-p/575504#M200548</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to count the values of a multivalue field by value. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval values_type=split( "value1,value2,value1,value2,value1,value2,value1,value2,value2,value2,value2,",",") 
| eval values_count=mvcount(values_type)
| eval value1=mvfilter(match(values_type,"value1"))
| eval value1_count=mvcount(value1)
| eval value2_count=values_count - value1_count
| table values_type message_count values_count value1_count value2_count&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rafadvega_0-1637256185618.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16915iA6618F604E9C6AF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rafadvega_0-1637256185618.png" alt="rafadvega_0-1637256185618.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;rafadvega_0-1637256185618.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there another way to do this? For example, if I don't know the possible values, this way doesn't work.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 17:24:54 GMT</pubDate>
    <dc:creator>rafadvega</dc:creator>
    <dc:date>2021-11-18T17:24:54Z</dc:date>
    <item>
      <title>mvcount by value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvcount-by-value/m-p/575504#M200548</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to count the values of a multivalue field by value. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval values_type=split( "value1,value2,value1,value2,value1,value2,value1,value2,value2,value2,value2,",",") 
| eval values_count=mvcount(values_type)
| eval value1=mvfilter(match(values_type,"value1"))
| eval value1_count=mvcount(value1)
| eval value2_count=values_count - value1_count
| table values_type message_count values_count value1_count value2_count&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rafadvega_0-1637256185618.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16915iA6618F604E9C6AF1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rafadvega_0-1637256185618.png" alt="rafadvega_0-1637256185618.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;rafadvega_0-1637256185618.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there another way to do this? For example, if I don't know the possible values, this way doesn't work.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 17:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvcount-by-value/m-p/575504#M200548</guid>
      <dc:creator>rafadvega</dc:creator>
      <dc:date>2021-11-18T17:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: mvcount by value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvcount-by-value/m-p/575538#M200554</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval values_type=split( "value1,value2,value1,value2,value1,value2,value1,value2,value2,value2,value2",",") 
| stats count by values_type&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:08:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvcount-by-value/m-p/575538#M200554</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-18T20:08:18Z</dc:date>
    </item>
  </channel>
</rss>

