<?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 Sum specific field value across all events in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539867#M37000</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data stream getting populated every 5 minutes as below. There are 100s of features in the data.&lt;/P&gt;&lt;P&gt;Feature: Rectagle&lt;BR /&gt;Side: 4&lt;BR /&gt;User: A&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:00:00&lt;BR /&gt;Block:1&lt;/P&gt;&lt;P&gt;Feature: Rectagle&lt;BR /&gt;Side: 4&lt;BR /&gt;User: A&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:00:00&lt;BR /&gt;Block:2&lt;/P&gt;&lt;P&gt;Feature: square&lt;BR /&gt;Side: 4&lt;BR /&gt;User: B&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:05:00&lt;BR /&gt;Block:1&lt;/P&gt;&lt;P&gt;Feature: Square&lt;BR /&gt;Side: 4&lt;BR /&gt;User: B&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:05:00&lt;BR /&gt;Block:2&lt;/P&gt;&lt;P&gt;I need to sum the side for each side field along with the used column&lt;/P&gt;&lt;P&gt;Something as below.&lt;/P&gt;&lt;P&gt;Feature: Rectangle&lt;/P&gt;&lt;P&gt;Side: 8&lt;/P&gt;&lt;P&gt;used:2&lt;/P&gt;&lt;P&gt;Time: 1/25/2021 5:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I have is, I could not sum the side either it comes as total across all events (it can be 4 * number of times it access across the period I selected) or 4. I am searching for a period of last 24 hours.&lt;/P&gt;&lt;P&gt;I tried with this, but not giving right value.&lt;/P&gt;&lt;P&gt;| foreach feature*&lt;BR /&gt;[ eval subtotal = subtotal + 'side']&lt;BR /&gt;| stats max(subtotal) as TOTAL by _time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2021 07:01:35 GMT</pubDate>
    <dc:creator>vivekkumarkk</dc:creator>
    <dc:date>2021-02-15T07:01:35Z</dc:date>
    <item>
      <title>Sum specific field value across all events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539867#M37000</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data stream getting populated every 5 minutes as below. There are 100s of features in the data.&lt;/P&gt;&lt;P&gt;Feature: Rectagle&lt;BR /&gt;Side: 4&lt;BR /&gt;User: A&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:00:00&lt;BR /&gt;Block:1&lt;/P&gt;&lt;P&gt;Feature: Rectagle&lt;BR /&gt;Side: 4&lt;BR /&gt;User: A&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:00:00&lt;BR /&gt;Block:2&lt;/P&gt;&lt;P&gt;Feature: square&lt;BR /&gt;Side: 4&lt;BR /&gt;User: B&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:05:00&lt;BR /&gt;Block:1&lt;/P&gt;&lt;P&gt;Feature: Square&lt;BR /&gt;Side: 4&lt;BR /&gt;User: B&lt;BR /&gt;Used:1&lt;BR /&gt;Time: 1/25/2021 5:05:00&lt;BR /&gt;Block:2&lt;/P&gt;&lt;P&gt;I need to sum the side for each side field along with the used column&lt;/P&gt;&lt;P&gt;Something as below.&lt;/P&gt;&lt;P&gt;Feature: Rectangle&lt;/P&gt;&lt;P&gt;Side: 8&lt;/P&gt;&lt;P&gt;used:2&lt;/P&gt;&lt;P&gt;Time: 1/25/2021 5:00:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I have is, I could not sum the side either it comes as total across all events (it can be 4 * number of times it access across the period I selected) or 4. I am searching for a period of last 24 hours.&lt;/P&gt;&lt;P&gt;I tried with this, but not giving right value.&lt;/P&gt;&lt;P&gt;| foreach feature*&lt;BR /&gt;[ eval subtotal = subtotal + 'side']&lt;BR /&gt;| stats max(subtotal) as TOTAL by _time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 07:01:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539867#M37000</guid>
      <dc:creator>vivekkumarkk</dc:creator>
      <dc:date>2021-02-15T07:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sum specific field value across all events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539976#M37008</link>
      <description>&lt;P&gt;Have you tried this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | stats sum(Side) as Side, sum(Used) as Used, first(Time) as Time by Feature&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Feb 2021 15:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539976#M37008</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-02-15T15:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sum specific field value across all events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539986#M37011</link>
      <description>&lt;P&gt;My problem is, there are 2 block fields. The sum of Side should be only from 2 blocks. With the above query, its sums up all the side field.&lt;/P&gt;&lt;P&gt;The query must select field side for rectangle from each block for any user within the selected time and sum only the sum of sides (here it is 8&amp;nbsp; &amp;nbsp;) always.&lt;/P&gt;&lt;P&gt;It should not add another 4 if user B uses from Block 1 only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thats why I tried with foreach.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 16:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539986#M37011</guid>
      <dc:creator>vivekkumarkk</dc:creator>
      <dc:date>2021-02-15T16:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sum specific field value across all events</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539993#M37012</link>
      <description>&lt;P&gt;If I understand correctly, you want different sums when the user changes.&amp;nbsp; That can be done with this modification.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | stats sum(Side) as Side, first(Time) as Time by Feature, User&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Feb 2021 16:33:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Sum-specific-field-value-across-all-events/m-p/539993#M37012</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-02-15T16:33:43Z</dc:date>
    </item>
  </channel>
</rss>

