<?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: Fields &amp; Transforming Search Results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52265#M179646</link>
    <description>&lt;P&gt;I thought eval could create fields too?&lt;/P&gt;

&lt;P&gt;Which eval should I try removing?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2011 08:19:27 GMT</pubDate>
    <dc:creator>srw46</dc:creator>
    <dc:date>2011-08-03T08:19:27Z</dc:date>
    <item>
      <title>Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52263#M179644</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I am using the follow string:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;*SEARCH TERM/MACROS HERE* | eval over = if (ttm_transaction_time&amp;gt;ttm_threshold, 1, 0) | stats sum(over) AS "Over_Threshold" count AS "Total" | eval Percentage = round (100-(Over_Threshold/Total*100),2)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The results table then displays the columns I expect i.e. :&lt;/P&gt;

&lt;P&gt;Over_Threshold ,           Total        ,  Percentage&lt;/P&gt;

&lt;P&gt;If I then try to add another (existing) field to the results using the following string:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;*SEARCH TERM/MACROS HERE* | eval over = if (ttm_transaction_time&amp;gt;ttm_threshold, 1, 0) | stats sum(over) AS "Over_Threshold" count AS "Total" BY ttm_transaction_id | eval Percentage = round (100-(Over_Threshold/Total*100),2)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I am expecting the results to display:&lt;/P&gt;

&lt;P&gt;Over_Threshold ,           Total        , ttm_transaction_id,  Percentage &lt;/P&gt;

&lt;P&gt;But instead they display&lt;/P&gt;

&lt;P&gt;Over_Threshold ,           Total        , ttm_transaction_id&lt;/P&gt;

&lt;P&gt;And seem to drop the Percentage column.&lt;/P&gt;

&lt;P&gt;Can anybody give me advice as to why this is happening or how I can change it to present the four columns I want (and possibly more)?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52263#M179644</guid>
      <dc:creator>srw46</dc:creator>
      <dc:date>2020-09-28T09:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52264#M179645</link>
      <description>&lt;P&gt;The only time when eval is not going to create the result field is if any of the fields on the right hand side of the = are not present. How do your results if you remove the eval look like (the first few rows would suffice)?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2011 01:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52264#M179645</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2011-08-03T01:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52265#M179646</link>
      <description>&lt;P&gt;I thought eval could create fields too?&lt;/P&gt;

&lt;P&gt;Which eval should I try removing?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2011 08:19:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52265#M179646</guid>
      <dc:creator>srw46</dc:creator>
      <dc:date>2011-08-03T08:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52266#M179647</link>
      <description>&lt;P&gt;Eval creates the Percentage field fine in the first example but not the second?  Also, I have two eval commands, which are suggesting I remove?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2011 08:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52266#M179647</guid>
      <dc:creator>srw46</dc:creator>
      <dc:date>2011-08-03T08:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52267#M179648</link>
      <description>&lt;P&gt;Sounds weird, I just try this search string similiarly, and it will generate four column as expected, but by default the count by field stands as the first column&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2011 08:59:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52267#M179648</guid>
      <dc:creator>hjwang</dc:creator>
      <dc:date>2011-08-03T08:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52268#M179649</link>
      <description>&lt;P&gt;Does anybody else have any suggestions for this issue?&lt;/P&gt;

&lt;P&gt;I've tried umpteen ways of re-ordering the commands but to no avail. &lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2011 07:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52268#M179649</guid>
      <dc:creator>srw46</dc:creator>
      <dc:date>2011-08-10T07:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52269#M179650</link>
      <description>&lt;P&gt;I've now managed to solve this problem.  Thanks for your guidance.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2011 08:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52269#M179650</guid>
      <dc:creator>srw46</dc:creator>
      <dc:date>2011-08-10T08:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fields &amp; Transforming Search Results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52270#M179651</link>
      <description>&lt;P&gt;Care to say what you did/tweaked?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 20:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fields-Transforming-Search-Results/m-p/52270#M179651</guid>
      <dc:creator>gordone</dc:creator>
      <dc:date>2017-01-25T20:19:52Z</dc:date>
    </item>
  </channel>
</rss>

