<?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: Calculated fields in an eval statement in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculated-fields-in-an-eval-statement/m-p/91468#M23542</link>
    <description>&lt;P&gt;asimagu,  Thank You for the assistance!  Bob&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2013 15:04:53 GMT</pubDate>
    <dc:creator>bcarlson</dc:creator>
    <dc:date>2013-07-11T15:04:53Z</dc:date>
    <item>
      <title>Calculated fields in an eval statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculated-fields-in-an-eval-statement/m-p/91466#M23540</link>
      <description>&lt;P&gt;Good Morning!  I am trying to build calculated fields that will create a wireless roamer cost report.  The report is based on a search of CDR's (Call Detail Records)  The search provides me with User,Carrier_Name, and Total_Megabytes_Used.  &lt;/P&gt;

&lt;P&gt;I am trying to use calculated fields to add in the roamer cost.&lt;/P&gt;

&lt;P&gt;eval Roamer_Cost = case(Carrier_Name=Bob Wireless,Total_Megabytes *.055,Carrier_Name=Jill Wireless,Total_Megabytes * .10,Carrier-Name=Home Wireless,Total Megabytes *.0)&lt;/P&gt;

&lt;P&gt;The report could then be charted to provide me with a report by user showing cost of roaming on each Carrier_Name.&lt;/P&gt;

&lt;P&gt;Any ideas how I can make this work?  Or suggestions of other ways to skin this cat?&lt;/P&gt;

&lt;P&gt;thanks&lt;BR /&gt;
bob&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculated-fields-in-an-eval-statement/m-p/91466#M23540</guid>
      <dc:creator>bcarlson</dc:creator>
      <dc:date>2020-09-28T14:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated fields in an eval statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculated-fields-in-an-eval-statement/m-p/91467#M23541</link>
      <description>&lt;P&gt;you need to use the case statement with the right syntax&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval Roamer_Cost=case(Carrier_Name=="Bob Wireles", Total_Megabytes_Used*0.055, ...and so on...)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then you need to pipe your search to this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;chart sum(Roamer_Cost) over Carrier_Name by User
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jul 2013 23:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculated-fields-in-an-eval-statement/m-p/91467#M23541</guid>
      <dc:creator>asimagu</dc:creator>
      <dc:date>2013-07-10T23:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated fields in an eval statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculated-fields-in-an-eval-statement/m-p/91468#M23542</link>
      <description>&lt;P&gt;asimagu,  Thank You for the assistance!  Bob&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2013 15:04:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculated-fields-in-an-eval-statement/m-p/91468#M23542</guid>
      <dc:creator>bcarlson</dc:creator>
      <dc:date>2013-07-11T15:04:53Z</dc:date>
    </item>
  </channel>
</rss>

