<?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 combine multiple field values to create single field name in eval statement. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498366#M138850</link>
    <description>&lt;P&gt;@jurjenterpstra &lt;/P&gt;

&lt;P&gt;Can you please share some sample data and expected results?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2019 12:12:16 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2019-10-07T12:12:16Z</dc:date>
    <item>
      <title>How to combine multiple field values to create single field name in eval statement.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498364#M138848</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to combine the values of multiple fields to together form a single field name in an eval if statement.&lt;BR /&gt;
Something like the example below.&lt;/P&gt;

&lt;P&gt;Is that in any way possible? &lt;/P&gt;

&lt;P&gt;Thanks for your help!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval {operation}_{merchant}_{country}=if((operation=operation AND country=country AND merchant=merchant), {operation}_{merchant}_{country}+1, 0)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Oct 2019 14:07:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498364#M138848</guid>
      <dc:creator>jurjenterpstra</dc:creator>
      <dc:date>2019-10-06T14:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple field values to create single field name in eval statement.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498365#M138849</link>
      <description>&lt;P&gt;@jurjenterpstra In order for community to assist you better you should provide more context with your data. For example what are some of the sample data and what is the output you need.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 15:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498365#M138849</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-10-06T15:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple field values to create single field name in eval statement.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498366#M138850</link>
      <description>&lt;P&gt;@jurjenterpstra &lt;/P&gt;

&lt;P&gt;Can you please share some sample data and expected results?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 12:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498366#M138850</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-10-07T12:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple field values to create single field name in eval statement.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498367#M138851</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="operation merchant country
1 2 3
4 5 6
7 8 9
10 11 12"
| multikv
| table operation merchant country
| eval true_condition=$country$+1
| eval {operation}_{merchant}_{country}=if(1==0,$operation$."_".$merchant$."_".$true_conditon$,0)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is a sample search.&lt;BR /&gt;
Change the &lt;CODE&gt;if&lt;/CODE&gt; search condition to suit your needs.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 13:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-field-values-to-create-single-field-name/m-p/498367#M138851</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-10-07T13:28:56Z</dc:date>
    </item>
  </channel>
</rss>

