<?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: Search failing to show last formula in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116000#M30791</link>
    <description>&lt;P&gt;If null is present in any then eval expression will not get executed.&lt;/P&gt;</description>
    <pubDate>Thu, 21 May 2015 09:15:35 GMT</pubDate>
    <dc:creator>Arun_N_007</dc:creator>
    <dc:date>2015-05-21T09:15:35Z</dc:date>
    <item>
      <title>Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/115998#M30789</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to add each of the scores being pulled through and / to get the average&lt;/P&gt;

&lt;P&gt;here is my search (I am sure there's a better method)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery "database" "SELECT * FROM new_compliancelist"| stats count(eval(FAILED&amp;lt;1)) as success count as total| eval SANS31 = success/total*100 |fields SANS31 | appendcols [ | dbquery "database" "SELECT * FROM SANS20Score" | WHERE SANSID = "3.2" | fields "COMPLIANCE%"| rename COMPLIANCE% as SANS3.2] | appendcols [ | dbquery "database" "SELECT * FROM SANS20Score" | WHERE SANSID = "3.3" | fields "COMPLIANCE%"| rename COMPLIANCE% as SANS3.3] | appendcols [ | dbquery "database" "SELECT * FROM SANS20Score" | WHERE SANSID = "3.6" | fields "COMPLIANCE%"| rename COMPLIANCE% as SANS3.6] | appendcols [ | dbquery "database" "SELECT * FROM SANS20Score" | WHERE SANSID = "3.7" | fields "COMPLIANCE%"| rename COMPLIANCE% as SANS3.7] | appendcols [ | dbquery "database" "SELECT * FROM SANS20Score" | WHERE SANSID = "3.10" | fields "COMPLIANCE%"| rename COMPLIANCE% as SANS3.10] | eval SANS3=(SANS3.1+SANS3.2+SANS3.3+SANS3.6+SANS3.7+SANS3.10)/6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The plan is to the output the Average to my traffic light range to see how the overall compliance with that SANS control is going.&lt;/P&gt;

&lt;P&gt;It all works apart from &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval SANS3=(SANS3.1+SANS3.2+SANS3.3+SANS3.6+SANS3.7+SANS3.10)/6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The SANS3 column never displays? (even without the /6)&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 07:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/115998#M30789</guid>
      <dc:creator>crossap</dc:creator>
      <dc:date>2015-05-21T07:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/115999#M30790</link>
      <description>&lt;P&gt;Please check you are getting any null values in SANS3.1, SANS3.2, SANS3.3, SANS3.6, SANS3.7, SANS3.10. If null is present then do fill null with 0 value.&lt;/P&gt;

&lt;P&gt;Then try,&lt;/P&gt;

&lt;P&gt;|fillnull value=0 SANS3.1, SANS3.2, SANS3.3, SANS3.6, SANS3.7, SANS3.10| eval SANS3=(SANS3.1+SANS3.2+SANS3.3+SANS3.6+SANS3.7+SANS3.10)/6&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:14:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/115999#M30790</guid>
      <dc:creator>Arun_N_007</dc:creator>
      <dc:date>2015-05-21T09:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116000#M30791</link>
      <description>&lt;P&gt;If null is present in any then eval expression will not get executed.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116000#M30791</guid>
      <dc:creator>Arun_N_007</dc:creator>
      <dc:date>2015-05-21T09:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116001#M30792</link>
      <description>&lt;P&gt;Hi Arun,&lt;/P&gt;

&lt;P&gt;There were no null values all showed 0 but I tried that anyway - but sadly not resolved the issues&lt;/P&gt;

&lt;P&gt;the table that displays&lt;/P&gt;

&lt;P&gt;SANS31            SANS3.10  SANS3.2      SANS3.3    SANS3.6          SANS3.7&lt;BR /&gt;
2.266010               0                   0              100           0                100&lt;/P&gt;

&lt;P&gt;I then want another column SANS3 which is each of the searches I listed above added together then / 6&lt;/P&gt;

&lt;P&gt;FYI it always complains about the /6 saying it must be a number? I have been removing this just to see if the new column appears but it doesnt&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116001#M30792</guid>
      <dc:creator>crossap</dc:creator>
      <dc:date>2015-05-21T09:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116002#M30793</link>
      <description>&lt;P&gt;Can you try like&lt;/P&gt;

&lt;P&gt;('SANS3.1'+ 'SANS3.2'+' SANS3.3'+' SANS3.4'+ 'SANS3.5'+' SANS3.6')/6&lt;/P&gt;

&lt;P&gt;Problem might be with "." operator.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:32:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116002#M30793</guid>
      <dc:creator>Arun_N_007</dc:creator>
      <dc:date>2015-05-21T09:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116003#M30794</link>
      <description>&lt;P&gt;Hi Arun,&lt;/P&gt;

&lt;P&gt;There were 2 issues&lt;/P&gt;

&lt;P&gt;You resolved the first with the above (thanks!!) and the second was a incorrect name (not SANS3.1 should have been SANS31 in the forumla)&lt;/P&gt;

&lt;P&gt;| eval SANS3=('SANS31'+'SANS3.2'+'SANS3.3'+'SANS3.10'+'SANS3.7'+'SANS3.6')/6&lt;/P&gt;

&lt;P&gt;thanks alot mate!&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116003#M30794</guid>
      <dc:creator>crossap</dc:creator>
      <dc:date>2015-05-21T09:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116004#M30795</link>
      <description>&lt;P&gt;I'm glad it worked. Can you accept the answer mate &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:50:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116004#M30795</guid>
      <dc:creator>Arun_N_007</dc:creator>
      <dc:date>2015-05-21T09:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116005#M30796</link>
      <description>&lt;P&gt;can you pop something in the answer box - seems I cant mark comments as answers &lt;/P&gt;

&lt;P&gt;I will then accept and award points thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:52:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116005#M30796</guid>
      <dc:creator>crossap</dc:creator>
      <dc:date>2015-05-21T09:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Search failing to show last formula</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116006#M30797</link>
      <description>&lt;P&gt;Can you try like&lt;/P&gt;

&lt;P&gt;('SANS3.1'+ 'SANS3.2'+' SANS3.3'+' SANS3.4'+ 'SANS3.5'+' SANS3.6')/6&lt;/P&gt;

&lt;P&gt;Problem might be with "." operator.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2015 09:54:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-failing-to-show-last-formula/m-p/116006#M30797</guid>
      <dc:creator>Arun_N_007</dc:creator>
      <dc:date>2015-05-21T09:54:15Z</dc:date>
    </item>
  </channel>
</rss>

