<?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 display a field two times in a table with the original values and after a rename of the values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480606#M193017</link>
    <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;As you can see below, I am doing a stats with the field "process_name"&lt;BR /&gt;
In order to be more comprenhensive, I am doing a rename of this field with a case function&lt;BR /&gt;
But in my table, I would like to display this field 2 times : one time with the original name and another time with the name done after the rename&lt;BR /&gt;
How I can do this please??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values xxxxxx by host process_name 
| eval process_name=case(process_name like "mfev%" OR process_name like "mcdatrep" OR process_name=="mcshield")
| rename process_name as "Process name" 
| table "Process name" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 13 Sep 2019 05:03:20 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2019-09-13T05:03:20Z</dc:date>
    <item>
      <title>how to display a field two times in a table with the original values and after a rename of the values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480606#M193017</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;As you can see below, I am doing a stats with the field "process_name"&lt;BR /&gt;
In order to be more comprenhensive, I am doing a rename of this field with a case function&lt;BR /&gt;
But in my table, I would like to display this field 2 times : one time with the original name and another time with the name done after the rename&lt;BR /&gt;
How I can do this please??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values xxxxxx by host process_name 
| eval process_name=case(process_name like "mfev%" OR process_name like "mcdatrep" OR process_name=="mcshield")
| rename process_name as "Process name" 
| table "Process name" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Sep 2019 05:03:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480606#M193017</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-13T05:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to display a field two times in a table with the original values and after a rename of the values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480607#M193018</link>
      <description>&lt;P&gt;Maybe evaluate it to a new field.&lt;BR /&gt;
| stats values xxxxxx by host process_name &lt;BR /&gt;
 | eval "Process name" =case(process_name like "mfev%" OR process_name like "mcdatrep" OR process_name=="mcshield")&lt;BR /&gt;
 | table "Process name" process_name &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480607#M193018</guid>
      <dc:creator>Melstrathdee</dc:creator>
      <dc:date>2020-09-30T02:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to display a field two times in a table with the original values and after a rename of the values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480608#M193019</link>
      <description>&lt;P&gt;no doesnt works&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 06:18:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480608#M193019</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-13T06:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to display a field two times in a table with the original values and after a rename of the values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480609#M193020</link>
      <description>&lt;P&gt;JIP31 check what your case statement, for me it returns an error.&lt;BR /&gt;
Without seeing your data I cant be sure I have your syntax right, but maybe try the below.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;| eval process_name=case(process_name&lt;BR /&gt;
like "mfev%",process_name,&lt;BR /&gt;
process_name like "mcdatrep",&lt;BR /&gt;
process_name,&lt;BR /&gt;
process_name=="mcshield",&lt;BR /&gt;
process_name)  | eval "Process name" =&lt;BR /&gt;
process_name  | table "Process name"&lt;BR /&gt;
process_name&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480609#M193020</guid>
      <dc:creator>Melstrathdee</dc:creator>
      <dc:date>2020-09-30T02:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to display a field two times in a table with the original values and after a rename of the values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480610#M193021</link>
      <description>&lt;P&gt;like this it works thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 07:15:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-a-field-two-times-in-a-table-with-the-original/m-p/480610#M193021</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-13T07:15:38Z</dc:date>
    </item>
  </channel>
</rss>

