<?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 Generate value of a field corresponding to duplicate value of other field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Generate-value-of-a-field-corresponding-to-duplicate-value-of/m-p/431823#M123432</link>
    <description>&lt;P&gt;I have 3 columns in my data.&lt;/P&gt;

&lt;P&gt;Minutes Store_ID &lt;BR /&gt;
10       81165&lt;BR /&gt;
20       80234&lt;BR /&gt;
30 81165&lt;BR /&gt;
40 80234&lt;BR /&gt;
50 82345&lt;/P&gt;

&lt;P&gt;I wish to generate a table in the below format.&lt;/P&gt;

&lt;P&gt;Store_ID Count Minutes&lt;BR /&gt;
81165 2 10,30&lt;BR /&gt;
80234 2 20,40&lt;BR /&gt;
82345 1 50&lt;/P&gt;

&lt;P&gt;The count corresponds to no. of appearances of the store_ID and minutes as a grouping of minutes it took.&lt;/P&gt;

&lt;P&gt;Can you please provide code for this data.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2019 07:13:35 GMT</pubDate>
    <dc:creator>nikita012</dc:creator>
    <dc:date>2019-06-17T07:13:35Z</dc:date>
    <item>
      <title>Generate value of a field corresponding to duplicate value of other field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Generate-value-of-a-field-corresponding-to-duplicate-value-of/m-p/431823#M123432</link>
      <description>&lt;P&gt;I have 3 columns in my data.&lt;/P&gt;

&lt;P&gt;Minutes Store_ID &lt;BR /&gt;
10       81165&lt;BR /&gt;
20       80234&lt;BR /&gt;
30 81165&lt;BR /&gt;
40 80234&lt;BR /&gt;
50 82345&lt;/P&gt;

&lt;P&gt;I wish to generate a table in the below format.&lt;/P&gt;

&lt;P&gt;Store_ID Count Minutes&lt;BR /&gt;
81165 2 10,30&lt;BR /&gt;
80234 2 20,40&lt;BR /&gt;
82345 1 50&lt;/P&gt;

&lt;P&gt;The count corresponds to no. of appearances of the store_ID and minutes as a grouping of minutes it took.&lt;/P&gt;

&lt;P&gt;Can you please provide code for this data.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 07:13:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Generate-value-of-a-field-corresponding-to-duplicate-value-of/m-p/431823#M123432</guid>
      <dc:creator>nikita012</dc:creator>
      <dc:date>2019-06-17T07:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Generate value of a field corresponding to duplicate value of other field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Generate-value-of-a-field-corresponding-to-duplicate-value-of/m-p/431824#M123433</link>
      <description>&lt;P&gt;@nikita012 &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | stats delim="," values(Minutes) as Minutes count as Count by Store_ID | mvcombine Minutes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw="Minutes Store_ID
10 81165
20 80234
30 81165
40 80234
50 82345" | multikv | table Minutes Store_ID | stats delim="," values(Minutes) as Minutes count as Count by Store_ID | mvcombine Minutes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 07:23:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Generate-value-of-a-field-corresponding-to-duplicate-value-of/m-p/431824#M123433</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-06-17T07:23:23Z</dc:date>
    </item>
  </channel>
</rss>

