<?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 How to group my data so that any values with the same time will be merged into 1 row? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-my-data-so-that-any-values-with-the-same-time-will/m-p/343197#M101628</link>
    <description>&lt;P&gt;Hi , I'm very new here with Splunk searches&lt;/P&gt;

&lt;P&gt;I'm trying to do a group by on my dataset so that any rows with the same time can be aggregated or merged into 1 row.&lt;BR /&gt;
eg:)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timesec  |  col1 | col2 |col3
11111    |  A    | B    |  C
11111    |  A1   | B    |  C
22222    |  D1   | D2   | D3
22222    |  E1   | E2   | E3
33333    |  tt   | tt1  | tt2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I'm trying to get something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timesec  |   col1          |        col2     |         col3
11111    |   A , A1        |        B        |         C
22222    |   D1,E1         |        D2,E2    |         D3,E3
33333    |   tt            |        tt1      |         tt2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not sure if its possible to keep 1 value if its the same or append by comma if its different so I am okay if the result is something like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timesec   |  col1          |      col2     |   col3
11111     |  A , A1        |      B,B      |   C,C
22222     |  D1,E1         |      D2,E2    |   D3,E3
33333     |  tt            |      tt1      |   tt2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I been trying to use stats list then by timesec but it seems to only get the timesec and then the rest of the column values are null. I am not too sure what I am doing wrong. Any help would be great. Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 20:00:27 GMT</pubDate>
    <dc:creator>dcheng123</dc:creator>
    <dc:date>2017-03-08T20:00:27Z</dc:date>
    <item>
      <title>How to group my data so that any values with the same time will be merged into 1 row?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-my-data-so-that-any-values-with-the-same-time-will/m-p/343197#M101628</link>
      <description>&lt;P&gt;Hi , I'm very new here with Splunk searches&lt;/P&gt;

&lt;P&gt;I'm trying to do a group by on my dataset so that any rows with the same time can be aggregated or merged into 1 row.&lt;BR /&gt;
eg:)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timesec  |  col1 | col2 |col3
11111    |  A    | B    |  C
11111    |  A1   | B    |  C
22222    |  D1   | D2   | D3
22222    |  E1   | E2   | E3
33333    |  tt   | tt1  | tt2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I'm trying to get something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timesec  |   col1          |        col2     |         col3
11111    |   A , A1        |        B        |         C
22222    |   D1,E1         |        D2,E2    |         D3,E3
33333    |   tt            |        tt1      |         tt2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not sure if its possible to keep 1 value if its the same or append by comma if its different so I am okay if the result is something like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timesec   |  col1          |      col2     |   col3
11111     |  A , A1        |      B,B      |   C,C
22222     |  D1,E1         |      D2,E2    |   D3,E3
33333     |  tt            |      tt1      |   tt2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I been trying to use stats list then by timesec but it seems to only get the timesec and then the rest of the column values are null. I am not too sure what I am doing wrong. Any help would be great. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 20:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-my-data-so-that-any-values-with-the-same-time-will/m-p/343197#M101628</guid>
      <dc:creator>dcheng123</dc:creator>
      <dc:date>2017-03-08T20:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to group my data so that any values with the same time will be merged into 1 row?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-my-data-so-that-any-values-with-the-same-time-will/m-p/343198#M101629</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | stats values(col1) as col1 values(col2) as col2 values(col3) as col3 by timesec delim="," 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 21:30:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-my-data-so-that-any-values-with-the-same-time-will/m-p/343198#M101629</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-08T21:30:10Z</dc:date>
    </item>
  </channel>
</rss>

