<?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 do i use eval to calculate two fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-use-eval-to-calculate-two-fields/m-p/537451#M151937</link>
    <description>&lt;P&gt;What I am trying to accomplish with the command is to find the events with the EventCode "4624" and Logon_Type "10" or "2", and to name them as "RDP", however i get the following error:&lt;/P&gt;&lt;P&gt;Here is the query below:&lt;BR /&gt;&lt;BR /&gt;index=wineventlogsecurity source=xmlWinEventLog:Security | stats count(eval(EventCode="4624") AND (Logon_Type="10")) AS RDP&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then I get this error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Error in 'stats' command: The eval expression for dynamic field 'eval(EventCode="4624") AND (Logon_Type="10")' is invalid. Error='The operator at ') AND (Logon_Type="10"' is invalid.'.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thanks in advance for any help! and apologies for the newbie questions as I am rather new to Splunk.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 16:48:04 GMT</pubDate>
    <dc:creator>FYPTEST</dc:creator>
    <dc:date>2021-01-27T16:48:04Z</dc:date>
    <item>
      <title>How do i use eval to calculate two fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-use-eval-to-calculate-two-fields/m-p/537451#M151937</link>
      <description>&lt;P&gt;What I am trying to accomplish with the command is to find the events with the EventCode "4624" and Logon_Type "10" or "2", and to name them as "RDP", however i get the following error:&lt;/P&gt;&lt;P&gt;Here is the query below:&lt;BR /&gt;&lt;BR /&gt;index=wineventlogsecurity source=xmlWinEventLog:Security | stats count(eval(EventCode="4624") AND (Logon_Type="10")) AS RDP&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then I get this error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Error in 'stats' command: The eval expression for dynamic field 'eval(EventCode="4624") AND (Logon_Type="10")' is invalid. Error='The operator at ') AND (Logon_Type="10"' is invalid.'.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thanks in advance for any help! and apologies for the newbie questions as I am rather new to Splunk.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 16:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-use-eval-to-calculate-two-fields/m-p/537451#M151937</guid>
      <dc:creator>FYPTEST</dc:creator>
      <dc:date>2021-01-27T16:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do i use eval to calculate two fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-use-eval-to-calculate-two-fields/m-p/537453#M151938</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=wineventlogsecurity source=xmlWinEventLog:Security EventCode="4624" (Logon_Type="10" OR Logon_Type="2") | stats count AS RDP&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 27 Jan 2021 17:07:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-use-eval-to-calculate-two-fields/m-p/537453#M151938</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-01-27T17:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do i use eval to calculate two fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-use-eval-to-calculate-two-fields/m-p/537461#M151941</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230941"&gt;@FYPTEST&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;STRONG&gt;AND&lt;/STRONG&gt; and &lt;STRONG&gt;OR&lt;/STRONG&gt; operators should be in the &lt;STRONG&gt;eval&lt;/STRONG&gt; function. Check this,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=wineventlogsecurity source=xmlWinEventLog:Security 
| stats count(eval(EventCode="4624" AND (Logon_Type="10" OR Logon_Type="2"))) AS RDP&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 17:36:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-use-eval-to-calculate-two-fields/m-p/537461#M151941</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-01-27T17:36:35Z</dc:date>
    </item>
  </channel>
</rss>

