<?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 Calculated field always evaluates to zero in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320520#M2952</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;

&lt;P&gt;I am attempting to create a field called &lt;STRONG&gt;app&lt;/STRONG&gt; for Enterprise Security based off of Cisco WSA Squid logs&lt;/P&gt;

&lt;P&gt;To create the field, I use a field alias of the sourcetype to fill the value of &lt;STRONG&gt;app&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Next I am trying to use a calculated field to determine to final value &lt;CODE&gt;app=case(app="cisco:wsa:squid","squid")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Testing this in a basic search works fine &lt;CODE&gt;sourcetype=cisco:wsa:squid | eval app=case(app="cisco:wsa:squid","squid") | table _time, app&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But using that search as a calculated field always evaluates to zero.&lt;/P&gt;

&lt;P&gt;Anyone have any idea why?&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2018 12:04:29 GMT</pubDate>
    <dc:creator>davidmonaghan</dc:creator>
    <dc:date>2018-01-19T12:04:29Z</dc:date>
    <item>
      <title>Calculated field always evaluates to zero</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320520#M2952</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;

&lt;P&gt;I am attempting to create a field called &lt;STRONG&gt;app&lt;/STRONG&gt; for Enterprise Security based off of Cisco WSA Squid logs&lt;/P&gt;

&lt;P&gt;To create the field, I use a field alias of the sourcetype to fill the value of &lt;STRONG&gt;app&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Next I am trying to use a calculated field to determine to final value &lt;CODE&gt;app=case(app="cisco:wsa:squid","squid")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Testing this in a basic search works fine &lt;CODE&gt;sourcetype=cisco:wsa:squid | eval app=case(app="cisco:wsa:squid","squid") | table _time, app&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But using that search as a calculated field always evaluates to zero.&lt;/P&gt;

&lt;P&gt;Anyone have any idea why?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 12:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320520#M2952</guid>
      <dc:creator>davidmonaghan</dc:creator>
      <dc:date>2018-01-19T12:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field always evaluates to zero</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320521#M2953</link>
      <description>&lt;P&gt;I have two queries.&lt;BR /&gt;
1) what eval expression you have configured . can you give the artifacts of &lt;CODE&gt;local/props.conf&lt;/CODE&gt; where this calculated field configuration is.&lt;BR /&gt;
2) Try making calculated field permissions to global.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 12:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320521#M2953</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-19T12:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field always evaluates to zero</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320522#M2954</link>
      <description>&lt;P&gt;1) I used the Splunk Web interface. The eval expression used was &lt;CODE&gt;app=case(app="cisco:wsa:squid","squid")&lt;/CODE&gt;&lt;BR /&gt;
2) Permission have been set to &lt;STRONG&gt;global&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 13:00:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320522#M2954</guid>
      <dc:creator>davidmonaghan</dc:creator>
      <dc:date>2018-01-19T13:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field always evaluates to zero</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320523#M2955</link>
      <description>&lt;P&gt;You need to write only &lt;CODE&gt;case(app="cisco:wsa:squid","squid")&lt;/CODE&gt; in the eval expression. Field name you have to specify in Name.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 13:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320523#M2955</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-19T13:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field always evaluates to zero</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320524#M2956</link>
      <description>&lt;P&gt;Thanks that worked perfectly&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:53:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320524#M2956</guid>
      <dc:creator>davidmonaghan</dc:creator>
      <dc:date>2018-01-22T10:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated field always evaluates to zero</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320525#M2957</link>
      <description>&lt;P&gt;I have converted my comment to an answer. If you deem a posted answer as valid and helpful to your solving of the issue, please accept said answer so that this question no longer appears open.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 11:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Calculated-field-always-evaluates-to-zero/m-p/320525#M2957</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-22T11:43:33Z</dc:date>
    </item>
  </channel>
</rss>

