<?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 Combining Multivalues together inside a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multivalues-together-inside-a-field/m-p/86757#M22129</link>
    <description>&lt;P&gt;I've got a field named "User" which holds the names of all the users of our service. Some users have similar names and I'd like to group them together in search outputs.&lt;/P&gt;

&lt;P&gt;I'm creating a search to output the number of transactions by user. &lt;/P&gt;

&lt;P&gt;source=index | chart count by User | rename count as "Transaction Count"&lt;/P&gt;

&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
User      |      Transaction Count&lt;BR /&gt;
ABC       |       100&lt;BR /&gt;
DEF       |       300&lt;BR /&gt;
GHI       |       400&lt;BR /&gt;
TEST      |       5&lt;BR /&gt;
TEST1     |       10&lt;BR /&gt;
TEST12    |       20&lt;BR /&gt;
TEST123   |       200&lt;BR /&gt;
JKL       |       300&lt;BR /&gt;
MNO       |       200&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;I'd like to group everything with "TEST" in the name together (they are the all the same user, but under similar userIDs), along with adding the values for each instance of "TEST" to create a new multivalue called "TEST" (see below).&lt;/P&gt;

&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
User      |      Transaction Count&lt;BR /&gt;
ABC       |       100&lt;BR /&gt;
DEF       |       300&lt;BR /&gt;
GHI       |       400&lt;BR /&gt;
TEST      |       235&lt;BR /&gt;
JKL       |       300&lt;BR /&gt;
MNO       |       200&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt; &lt;/P&gt;

&lt;P&gt;Can anybody help me? Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Oct 2012 09:51:00 GMT</pubDate>
    <dc:creator>watsm10</dc:creator>
    <dc:date>2012-10-11T09:51:00Z</dc:date>
    <item>
      <title>Combining Multivalues together inside a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multivalues-together-inside-a-field/m-p/86757#M22129</link>
      <description>&lt;P&gt;I've got a field named "User" which holds the names of all the users of our service. Some users have similar names and I'd like to group them together in search outputs.&lt;/P&gt;

&lt;P&gt;I'm creating a search to output the number of transactions by user. &lt;/P&gt;

&lt;P&gt;source=index | chart count by User | rename count as "Transaction Count"&lt;/P&gt;

&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
User      |      Transaction Count&lt;BR /&gt;
ABC       |       100&lt;BR /&gt;
DEF       |       300&lt;BR /&gt;
GHI       |       400&lt;BR /&gt;
TEST      |       5&lt;BR /&gt;
TEST1     |       10&lt;BR /&gt;
TEST12    |       20&lt;BR /&gt;
TEST123   |       200&lt;BR /&gt;
JKL       |       300&lt;BR /&gt;
MNO       |       200&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;I'd like to group everything with "TEST" in the name together (they are the all the same user, but under similar userIDs), along with adding the values for each instance of "TEST" to create a new multivalue called "TEST" (see below).&lt;/P&gt;

&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
User      |      Transaction Count&lt;BR /&gt;
ABC       |       100&lt;BR /&gt;
DEF       |       300&lt;BR /&gt;
GHI       |       400&lt;BR /&gt;
TEST      |       235&lt;BR /&gt;
JKL       |       300&lt;BR /&gt;
MNO       |       200&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt; &lt;/P&gt;

&lt;P&gt;Can anybody help me? Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2012 09:51:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combining-Multivalues-together-inside-a-field/m-p/86757#M22129</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2012-10-11T09:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multivalues together inside a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multivalues-together-inside-a-field/m-p/86758#M22130</link>
      <description>&lt;P&gt;If you don't care about keeping all the test accounts separate, I would use rex to rename them at search time.  Something like this should work:&lt;/P&gt;

&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
 | rex field=User mode=sed "s/(TEST).*/\1/" | chart count by User&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;This assumes that no legitimate user account will have the word TEST in it, so depending on your data you may have to tweak the regex a bit.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2012 13:20:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combining-Multivalues-together-inside-a-field/m-p/86758#M22130</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2012-10-11T13:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multivalues together inside a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combining-Multivalues-together-inside-a-field/m-p/86759#M22131</link>
      <description>&lt;P&gt;Thankyou so much!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2012 14:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combining-Multivalues-together-inside-a-field/m-p/86759#M22131</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2012-10-11T14:07:53Z</dc:date>
    </item>
  </channel>
</rss>

