<?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: How do I divide each value in this row by a value in one of the columns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-divide-each-value-in-this-row-by-a-value-in-one-of-the/m-p/210391#M61509</link>
    <description>&lt;P&gt;You can use the eval command to create a new columns or modify the values of the current columns (documentation here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/eval" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/eval&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;Renaming your columns will make the eval strings a bit neater, for example.. &lt;/P&gt;

&lt;P&gt;... | rename "count(CMDB Server" as "CMDB_Server",  "count(CMDB APP)" as "CMDB_App" | eval CMDB_App = CMDB_App/CMDB_Server&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 07:47:17 GMT</pubDate>
    <dc:creator>jluo_splunk</dc:creator>
    <dc:date>2020-09-29T07:47:17Z</dc:date>
    <item>
      <title>How do I divide each value in this row by a value in one of the columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-divide-each-value-in-this-row-by-a-value-in-one-of-the/m-p/210390#M61508</link>
      <description>&lt;P&gt;How would I divide each value in this row by the count(CMDB SERVER) calc?&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/779i79F840212CE56C5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 17:22:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-divide-each-value-in-this-row-by-a-value-in-one-of-the/m-p/210390#M61508</guid>
      <dc:creator>jhayIV</dc:creator>
      <dc:date>2015-10-30T17:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I divide each value in this row by a value in one of the columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-divide-each-value-in-this-row-by-a-value-in-one-of-the/m-p/210391#M61509</link>
      <description>&lt;P&gt;You can use the eval command to create a new columns or modify the values of the current columns (documentation here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/eval" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/eval&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;Renaming your columns will make the eval strings a bit neater, for example.. &lt;/P&gt;

&lt;P&gt;... | rename "count(CMDB Server" as "CMDB_Server",  "count(CMDB APP)" as "CMDB_App" | eval CMDB_App = CMDB_App/CMDB_Server&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:47:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-divide-each-value-in-this-row-by-a-value-in-one-of-the/m-p/210391#M61509</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2020-09-29T07:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I divide each value in this row by a value in one of the columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-divide-each-value-in-this-row-by-a-value-in-one-of-the/m-p/210392#M61510</link>
      <description>&lt;P&gt;Assuming the columns are dynamic you'll want to use &lt;CODE&gt;foreach&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rename "count(CMDB SERVER)" as cmdb | foreach count* [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' / cmdb] | rename cmdb as "count(CMDB SERVER)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Nov 2015 00:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-divide-each-value-in-this-row-by-a-value-in-one-of-the/m-p/210392#M61510</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-11-01T00:23:53Z</dc:date>
    </item>
  </channel>
</rss>

