<?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: Regarding eval operations on the fields having special characters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595135#M207104</link>
    <description>&lt;P&gt;Is this what you mean?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval total_requests='a-b-1'+'a-b-2'&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 25 Apr 2022 08:55:11 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-04-25T08:55:11Z</dc:date>
    <item>
      <title>Regarding eval operations on the fields having special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595134#M207103</link>
      <description>&lt;P&gt;I wanted to add this chaining command with my search and display total of the values under fields(columns) "a-b-1"&amp;nbsp; and "a-b-2" and give the total results as total_requests&amp;nbsp;&lt;/P&gt;&lt;P&gt;eval total_requests=a-b-1+a-b-2&lt;/P&gt;&lt;P&gt;where "a-b-1" and "a-b-2" is the field1 and field2 which i want to add using '+' operator&lt;/P&gt;&lt;P&gt;I have tried putting fields in double quotes and single quotes but unfortunately&amp;nbsp; it is not working.&lt;/P&gt;&lt;P&gt;I can do it by renaming the fields but can someone suggest someway to do without renaming it.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 08:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595134#M207103</guid>
      <dc:creator>sudhir_norway</dc:creator>
      <dc:date>2022-04-25T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding eval operations on the fields having special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595135#M207104</link>
      <description>&lt;P&gt;Is this what you mean?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval total_requests='a-b-1'+'a-b-2'&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 25 Apr 2022 08:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595135#M207104</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-25T08:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding eval operations on the fields having special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595136#M207105</link>
      <description>&lt;P class="lia-align-left"&gt;Yes but its not working as expected&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 08:58:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595136#M207105</guid>
      <dc:creator>sudhir_norway</dc:creator>
      <dc:date>2022-04-25T08:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding eval operations on the fields having special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595137#M207106</link>
      <description>&lt;P&gt;Can you give an example of when it is not giving the expected result? Also, is this happening for every event or just some of them?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 09:01:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595137#M207106</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-25T09:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding eval operations on the fields having special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595143#M207109</link>
      <description>&lt;P&gt;| timechart span=10m count by host |rename a-b-1 as a1 |rename a-b-2 as a2 |eval total_requests=a1+a2&lt;/P&gt;&lt;P&gt;Above works as expected and chart displays with total_requests correctly&lt;/P&gt;&lt;P&gt;But when i tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;| timechart span=5m count by host |eval total_requests=a-b-1+a-b-2 then it dont work(I tried keeping both in single quotes and double quotes but didnt worked).Its not displaying the total&lt;/P&gt;&lt;P&gt;Below is the sample data and what i am looking for&lt;/P&gt;&lt;TABLE width="292"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;Time&lt;/TD&gt;&lt;TD width="64"&gt;a-b-1&lt;/TD&gt;&lt;TD width="64"&gt;a-b-2&lt;/TD&gt;&lt;TD width="100"&gt;Total_requests&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0:00&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0:10&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0:20&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 09:21:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595143#M207109</guid>
      <dc:creator>sudhir_norway</dc:creator>
      <dc:date>2022-04-25T09:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding eval operations on the fields having special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595146#M207110</link>
      <description>&lt;P&gt;Here is a runanywhere example showing the syntax working.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="
Time	a-b-1	a-b-2	Total_requests
0:00	2	3	5
0:10	4	6	10
0:20	8	10	18"
| multikv forceheader=1
| rename a_b_1 as "a-b-1" a_b_2 as "a-b-2"
| fields Time "a-b-1" "a-b-2"
| fields - _raw _time
``` the lines above set up example data as posted ```
| eval Total_requests='a-b-1'+'a-b-2'&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 25 Apr 2022 09:30:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regarding-eval-operations-on-the-fields-having-special/m-p/595146#M207110</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-25T09:30:25Z</dc:date>
    </item>
  </channel>
</rss>

