<?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: Eval count event field in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Eval-count-event-field/m-p/297899#M733</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval raw="row1 row1 1::row2 row2 2::row3 row3 1::row4 row4 3::row5 row5 1::row6 row6 2"
| makemv delim="::" raw
| mvexpand raw
| fields - _time
| rex field=raw "^(?&amp;lt;COL_A&amp;gt;\S+)\s+(?&amp;lt;COL_B&amp;gt;\S+)\s+(?&amp;lt;COL_ID&amp;gt;\S+)$"

| rename COMMENT AS "Everything above fakes your data; everything below is your solution"

| eventstats count AS occurred BY COL_ID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 May 2017 12:10:47 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-05-17T12:10:47Z</dc:date>
    <item>
      <title>Eval count event field</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Eval-count-event-field/m-p/297898#M732</link>
      <description>&lt;P&gt;Hello Community&lt;/P&gt;

&lt;P&gt;I'm new with splunk and I need your help.&lt;/P&gt;

&lt;P&gt;I have for example the following output (events):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;COL_A       COL_B       COL_ID
row1        row1        1
row2        row2        2
row3        row3        1
row4        row4        3
row5        row5        1
row6        row6        2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I want, is to add a new field to count them by the occurrence of their ID (col_id):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;COL_A       COL_B       COL_ID      occurred
row1        row1        1           3
row2        row2        2           2
row3        row3        1           3
row4        row4        3           1
row5        row5        1           3
row6        row6        2           2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there a way to do this?&lt;/P&gt;

&lt;P&gt;Br,&lt;BR /&gt;
Arber&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 09:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Eval-count-event-field/m-p/297898#M732</guid>
      <dc:creator>arbero</dc:creator>
      <dc:date>2017-05-17T09:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Eval count event field</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Eval-count-event-field/m-p/297899#M733</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval raw="row1 row1 1::row2 row2 2::row3 row3 1::row4 row4 3::row5 row5 1::row6 row6 2"
| makemv delim="::" raw
| mvexpand raw
| fields - _time
| rex field=raw "^(?&amp;lt;COL_A&amp;gt;\S+)\s+(?&amp;lt;COL_B&amp;gt;\S+)\s+(?&amp;lt;COL_ID&amp;gt;\S+)$"

| rename COMMENT AS "Everything above fakes your data; everything below is your solution"

| eventstats count AS occurred BY COL_ID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2017 12:10:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Eval-count-event-field/m-p/297899#M733</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-17T12:10:47Z</dc:date>
    </item>
  </channel>
</rss>

