<?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 Concatenating values from one field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706906#M239155</link>
    <description>&lt;P&gt;How can we concatenate values from one field and put it in a new variable with commas.&lt;/P&gt;&lt;P&gt;e.g If I run a search , I get number of host in host field. I want to concatenate them all in one field separated by commas.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2024 14:39:14 GMT</pubDate>
    <dc:creator>Sailesh6891</dc:creator>
    <dc:date>2024-12-16T14:39:14Z</dc:date>
    <item>
      <title>Concatenating values from one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706906#M239155</link>
      <description>&lt;P&gt;How can we concatenate values from one field and put it in a new variable with commas.&lt;/P&gt;&lt;P&gt;e.g If I run a search , I get number of host in host field. I want to concatenate them all in one field separated by commas.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 14:39:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706906#M239155</guid>
      <dc:creator>Sailesh6891</dc:creator>
      <dc:date>2024-12-16T14:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating values from one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706908#M239156</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274436"&gt;@Sailesh6891&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you could try somethng like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats values(host) AS host BY index
| nomv host&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 14:45:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706908#M239156</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-12-16T14:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating values from one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706910#M239157</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval newField=mvjoin(host, ",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 14:57:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706910#M239157</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-12-16T14:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating values from one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706919#M239158</link>
      <description>&lt;P&gt;This does not work. newField have the same values as host field. Its not concatenating.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 15:55:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706919#M239158</guid>
      <dc:creator>Sailesh6891</dc:creator>
      <dc:date>2024-12-16T15:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating values from one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706920#M239159</link>
      <description>&lt;P&gt;The values are *supposed* to be the same in the new field, except with commas added.&lt;/P&gt;&lt;P&gt;Please share sanitized examples of what results you have now and what you want.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 16:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706920#M239159</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-12-16T16:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating values from one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706986#M239175</link>
      <description>&lt;P&gt;Do you mean you want to concatenate host values from all events collectively, not just from each individual event? &amp;nbsp;If that's all you want, you can do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats values(host) AS host
| eval newfield = mvjoin(host, ",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want a new field alongside other fields in events, use eventstats instead of stats&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| eventstats values(host) AS newfield
| eval newfield = mvjoin(newfield, ",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 03:42:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/706986#M239175</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-12-17T03:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating values from one field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/707396#M239274</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274436"&gt;@Sailesh6891&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 16:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-values-from-one-field/m-p/707396#M239274</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-12-20T16:32:54Z</dc:date>
    </item>
  </channel>
</rss>

