<?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 graph the sum of field A where field B=TRUE and field C=FALSE into a timechart by day? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201050#M58273</link>
    <description>&lt;P&gt;The question is the simple case of one set of conditions.  My goal is to line graph (4) variations in one chart:&lt;/P&gt;

&lt;P&gt;sum field A where field B=TRUE and field C=FALSE  as outbound&lt;BR /&gt;
sum field A where field B=FALSE and field C=TRUE  as inbound&lt;BR /&gt;
sum field A where field B=TRUE and field C=TRUE  as internal&lt;BR /&gt;
sum field A where field B=FALSE and field C=FALSE  as passthru&lt;BR /&gt;
pipe into a timechart by day.&lt;/P&gt;

&lt;P&gt;This working Splunk search charts the number of records that satisfies each of the 4 tests, but I can't figure out how to sum the Field A (producer_filename_bytes) of those matching records to line chart the 4 cumulative bytes of each?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prd_sterling sourcetype="sfg:fg_activity" state=Routed | timechart per_day(eval(producer_is_internal="TRUE" and consumer_is_internal="FALSE")) AS TotalOutbound, 
per_day(eval(producer_is_internal="FALSE" and consumer_is_internal="TRUE")) AS TotalInbound,
per_day(eval(producer_is_internal="TRUE" and consumer_is_internal="TRUE")) AS TotalInternal,
per_day(eval(producer_is_internal="FALSE" and consumer_is_internal="FALSE")) AS TotalPassThru
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks very much!  -Marc&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:54:10 GMT</pubDate>
    <dc:creator>marcoeur5</dc:creator>
    <dc:date>2020-09-29T09:54:10Z</dc:date>
    <item>
      <title>How to graph the sum of field A where field B=TRUE and field C=FALSE into a timechart by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201050#M58273</link>
      <description>&lt;P&gt;The question is the simple case of one set of conditions.  My goal is to line graph (4) variations in one chart:&lt;/P&gt;

&lt;P&gt;sum field A where field B=TRUE and field C=FALSE  as outbound&lt;BR /&gt;
sum field A where field B=FALSE and field C=TRUE  as inbound&lt;BR /&gt;
sum field A where field B=TRUE and field C=TRUE  as internal&lt;BR /&gt;
sum field A where field B=FALSE and field C=FALSE  as passthru&lt;BR /&gt;
pipe into a timechart by day.&lt;/P&gt;

&lt;P&gt;This working Splunk search charts the number of records that satisfies each of the 4 tests, but I can't figure out how to sum the Field A (producer_filename_bytes) of those matching records to line chart the 4 cumulative bytes of each?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prd_sterling sourcetype="sfg:fg_activity" state=Routed | timechart per_day(eval(producer_is_internal="TRUE" and consumer_is_internal="FALSE")) AS TotalOutbound, 
per_day(eval(producer_is_internal="FALSE" and consumer_is_internal="TRUE")) AS TotalInbound,
per_day(eval(producer_is_internal="TRUE" and consumer_is_internal="TRUE")) AS TotalInternal,
per_day(eval(producer_is_internal="FALSE" and consumer_is_internal="FALSE")) AS TotalPassThru
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks very much!  -Marc&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:54:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201050#M58273</guid>
      <dc:creator>marcoeur5</dc:creator>
      <dc:date>2020-09-29T09:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to graph the sum of field A where field B=TRUE and field C=FALSE into a timechart by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201051#M58274</link>
      <description>&lt;P&gt;Try like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=prd_sterling sourcetype="sfg:fg_activity" state=Routed 
| eval Outbound=if(producer_is_internal="TRUE" and consumer_is_internal="FALSE",producer_filename_bytes,0)
| eval Inbound=if(producer_is_internal="FALSE" and consumer_is_internal="TRUE",producer_filename_bytes,0)
| eval Internal=if(producer_is_internal="TRUE" and consumer_is_internal="TRUE",producer_filename_bytes,0)
| eval PassThru=if(producer_is_internal="FALSE" and consumer_is_internal="FALSE",producer_filename_bytes,0) | 
| timechart per_day(Outbound) as TotalOutbound per_day(Inbound) as TotalInbound per_day(Internal) AS TotalInternal,
per_day(PassThru) AS TotalPassThru
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jun 2016 16:46:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201051#M58274</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-08T16:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to graph the sum of field A where field B=TRUE and field C=FALSE into a timechart by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201052#M58275</link>
      <description>&lt;P&gt;Thanks somesoni2!  That works perfectly. Really appreciate the assist.  &lt;/P&gt;

&lt;P&gt;FYI to others, remove the second pipe ahead of the timechart command. &lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 17:18:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201052#M58275</guid>
      <dc:creator>marcoeur5</dc:creator>
      <dc:date>2016-06-08T17:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to graph the sum of field A where field B=TRUE and field C=FALSE into a timechart by day?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201053#M58276</link>
      <description>&lt;P&gt;Hi @marcoeur5&lt;/P&gt;

&lt;P&gt;Glad you found an answer through @somesoni2 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Don't forget to resolve the post by clicking "Accept" directly below his answer. Also, be sure to upvote his answer for helping you out.&lt;/P&gt;

&lt;P&gt;Cheers&lt;BR /&gt;
Patrick&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 17:30:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-graph-the-sum-of-field-A-where-field-B-TRUE-and-field-C/m-p/201053#M58276</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-06-08T17:30:47Z</dc:date>
    </item>
  </channel>
</rss>

