<?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: Add 2 columns in a table on applied condition in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Add-2-columns-in-a-table-on-applied-condition/m-p/210988#M61702</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;your Base query to generate place , mag, depth
| eval mag=if(place="7km W of Cobb, California" OR place="1km SE of Loma Linda, California", mag+depth, mag)
| eval depth=if(place="7km W of Cobb, California" OR place="1km SE of Loma Linda, California", 0, depth)
| table place, mag, depth
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 05 Nov 2016 17:00:20 GMT</pubDate>
    <dc:creator>gokadroid</dc:creator>
    <dc:date>2016-11-05T17:00:20Z</dc:date>
    <item>
      <title>Add 2 columns in a table on applied condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-2-columns-in-a-table-on-applied-condition/m-p/210987#M61701</link>
      <description>&lt;P&gt;I have 3 columns in a table as below. &lt;BR /&gt;
I need to sum two colums(mag and depth) if place="7km W of Cobb,california" or "1km se of loma linda,california".&lt;BR /&gt;
 show the result in mag and make depth as 0 column as 0 on applied condition(place).&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2106iDAD5C2C1BD4BBEBA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;my result should be as follows:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2107i66B3490D1E319874/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
Please help me to make a query for my condition.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2016 11:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-2-columns-in-a-table-on-applied-condition/m-p/210987#M61701</guid>
      <dc:creator>nivethainspire_</dc:creator>
      <dc:date>2016-11-05T11:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add 2 columns in a table on applied condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-2-columns-in-a-table-on-applied-condition/m-p/210988#M61702</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;your Base query to generate place , mag, depth
| eval mag=if(place="7km W of Cobb, California" OR place="1km SE of Loma Linda, California", mag+depth, mag)
| eval depth=if(place="7km W of Cobb, California" OR place="1km SE of Loma Linda, California", 0, depth)
| table place, mag, depth
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Nov 2016 17:00:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-2-columns-in-a-table-on-applied-condition/m-p/210988#M61702</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-05T17:00:20Z</dc:date>
    </item>
  </channel>
</rss>

