<?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: How to merge two events with same field into one in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495250#M138089</link>
    <description>&lt;P&gt;If Count is actually a field, the above should work. If not, try this.&lt;/P&gt;

&lt;P&gt;your_search&lt;BR /&gt;
| stats values(Text) as Text, count as Count by Name&lt;BR /&gt;
| table Name, Text, Count&lt;BR /&gt;
| eval Text=mvjoin(Text,",")&lt;/P&gt;

&lt;P&gt;the eval Text mvjoin can be added if you want it to be a comma separated list&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2020 13:48:01 GMT</pubDate>
    <dc:creator>jrceja313</dc:creator>
    <dc:date>2020-05-08T13:48:01Z</dc:date>
    <item>
      <title>How to merge two events with same field into one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495247#M138086</link>
      <description>&lt;P&gt;I have two rows having follwing values:&lt;BR /&gt;
Name    Text    Count&lt;BR /&gt;
A   ABC 1&lt;BR /&gt;
A   EFG 1&lt;/P&gt;

&lt;P&gt;I want that my result should be displayed in single row showing count as 2 and both the text for a common name = A. Is there a way we can acheive this&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 06:23:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495247#M138086</guid>
      <dc:creator>sudeep5689</dc:creator>
      <dc:date>2020-05-08T06:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge two events with same field into one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495248#M138087</link>
      <description>&lt;P&gt;Hi @sudeep5689,&lt;BR /&gt;
try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| stats values(Text) AS Text sum(Count) AS Count BY Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 07:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495248#M138087</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-05-08T07:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge two events with same field into one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495249#M138088</link>
      <description>&lt;P&gt;Hi Thanks for your response, but when i tried this, its not displaying the count .I mean count should be displayed in the count column. but its not displaying it&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 08:56:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495249#M138088</guid>
      <dc:creator>sudeep5689</dc:creator>
      <dc:date>2020-05-08T08:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge two events with same field into one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495250#M138089</link>
      <description>&lt;P&gt;If Count is actually a field, the above should work. If not, try this.&lt;/P&gt;

&lt;P&gt;your_search&lt;BR /&gt;
| stats values(Text) as Text, count as Count by Name&lt;BR /&gt;
| table Name, Text, Count&lt;BR /&gt;
| eval Text=mvjoin(Text,",")&lt;/P&gt;

&lt;P&gt;the eval Text mvjoin can be added if you want it to be a comma separated list&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 13:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-merge-two-events-with-same-field-into-one/m-p/495250#M138089</guid>
      <dc:creator>jrceja313</dc:creator>
      <dc:date>2020-05-08T13:48:01Z</dc:date>
    </item>
  </channel>
</rss>

