<?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 How to achieve sum of two fields excluding null fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622222#M216290</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;can any one help me how to get splunk query for below requirement.&lt;/P&gt;
&lt;P&gt;index="abc"&lt;BR /&gt;| search "message"="Exit" | search "stepName"=NotifyFlowEnd | search stepName!=""&lt;BR /&gt;| search "message"="PAST_TIME_FRAME"&lt;BR /&gt;|&amp;nbsp; chart count by "message"&lt;/P&gt;
&lt;P&gt;In message="Exit"&amp;nbsp; these 2 conditions need to include -----&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;| search "stepName"=NotifyFlowEnd | search stepName!=""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output is to get Sum of&amp;nbsp; "message"="Exit"&amp;nbsp; +&amp;nbsp; "PAST_TIME_FRAME" count&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2022 04:33:43 GMT</pubDate>
    <dc:creator>monicateja</dc:creator>
    <dc:date>2022-11-28T04:33:43Z</dc:date>
    <item>
      <title>How to achieve sum of two fields excluding null fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622222#M216290</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;can any one help me how to get splunk query for below requirement.&lt;/P&gt;
&lt;P&gt;index="abc"&lt;BR /&gt;| search "message"="Exit" | search "stepName"=NotifyFlowEnd | search stepName!=""&lt;BR /&gt;| search "message"="PAST_TIME_FRAME"&lt;BR /&gt;|&amp;nbsp; chart count by "message"&lt;/P&gt;
&lt;P&gt;In message="Exit"&amp;nbsp; these 2 conditions need to include -----&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;| search "stepName"=NotifyFlowEnd | search stepName!=""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output is to get Sum of&amp;nbsp; "message"="Exit"&amp;nbsp; +&amp;nbsp; "PAST_TIME_FRAME" count&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 04:33:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622222#M216290</guid>
      <dc:creator>monicateja</dc:creator>
      <dc:date>2022-11-28T04:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve sum of two fields excluding null fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622231#M216293</link>
      <description>&lt;LI-CODE lang="markup"&gt;index="abc" "message" IN ("Exit", "PAST_TIME_FRAME") "stepName"=NotifyFlowEnd
| chart count by "message"&lt;/LI-CODE&gt;&lt;P&gt;This should do. &amp;nbsp;Note that search commands should be combined in the first command as much as possible. &amp;nbsp;Another thing to note is that if you have stepName=NotifyFlowEnd, stepName !="" would be unnecessary.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 05:09:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622231#M216293</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-28T05:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve sum of two fields excluding null fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622234#M216295</link>
      <description>&lt;P&gt;Thanks for response. Query is working but only getting count values for message=Exit but not for PAST_TIME_FRAME&lt;/P&gt;&lt;P&gt;step.name= NotifyFlowEnd is extra filter for message=Exit and need to remove step.name=“”&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 06:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622234#M216295</guid>
      <dc:creator>monicateja</dc:creator>
      <dc:date>2022-11-28T06:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve sum of two fields excluding null fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622237#M216298</link>
      <description>&lt;P&gt;In that case,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="abc" (("message"="Exit" "stepName"=NotifyFlowEnd) OR (message="PAST_TIME_FRAME" stepName!=""))
| chart count by "message"&lt;/LI-CODE&gt;&lt;P&gt;It is much better to explain the problem &lt;STRONG&gt;and&lt;/STRONG&gt; data in text even when you illustrate code that you tried. &amp;nbsp;Also, if the code you tried did not get the desired result, describe the result &lt;STRONG&gt;and&lt;/STRONG&gt; explain why it is not desired. &amp;nbsp;This way, others do not have to guess what you meant in code fragments that do not reflect the actual requirements.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 07:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-achieve-sum-of-two-fields-excluding-null-fields/m-p/622237#M216298</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-28T07:17:05Z</dc:date>
    </item>
  </channel>
</rss>

