<?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: Total foreach Row in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373977#M169728</link>
    <description>&lt;P&gt;Using &lt;CODE&gt;| addtotals label=_TOTAL&lt;/CODE&gt; should also be possible, right?&lt;/P&gt;

&lt;P&gt;Also - if you use sort, remember to use &lt;CODE&gt;| sort 0 _TOTAL&lt;/CODE&gt;, because by default sort is limited to 10000 results.&lt;/P&gt;</description>
    <pubDate>Wed, 02 May 2018 21:16:42 GMT</pubDate>
    <dc:creator>xpac</dc:creator>
    <dc:date>2018-05-02T21:16:42Z</dc:date>
    <item>
      <title>Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373970#M169721</link>
      <description>&lt;P&gt;I have a query that shows me the type of operations someone has performed but I would also like to sort by the total number of operations (show i can see most active users at the top) - a total column would be awesome as well.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Data:&lt;/P&gt;

&lt;P&gt;Name   Operation1   Operation2   Operation3&lt;/P&gt;

&lt;P&gt;User   5   0   3&lt;BR /&gt;
User   1   0   0&lt;BR /&gt;
User   4   1   2&lt;/P&gt;

&lt;P&gt;Query so far:&lt;BR /&gt;
index=*&lt;BR /&gt;
| eval UserId=mvindex(split(UserId,"@"),0) &lt;BR /&gt;
| eval tcount=eventcount summarize=false&lt;BR /&gt;
| lookup peopledata network_uid AS UserId OUTPUT name as Name, location &lt;BR /&gt;
| chart count by Name, Operation&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 15:16:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373970#M169721</guid>
      <dc:creator>cewing082</dc:creator>
      <dc:date>2018-05-02T15:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373971#M169722</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=*
| eval UserId=mvindex(split(UserId,"@"),0) 
| eval tcount=eventcount summarize=false
| lookup peopledata network_uid AS UserId OUTPUT name as Name, location 
| chart count by Name, Operation
| addtotals 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 16:17:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373971#M169722</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-02T16:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373972#M169723</link>
      <description>&lt;P&gt;Probably missing the sort command of the field &lt;CODE&gt;Total&lt;/CODE&gt; at the end.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 16:24:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373972#M169723</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-02T16:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373973#M169724</link>
      <description>&lt;P&gt;You need the &lt;CODE&gt;addtotals&lt;/CODE&gt; command.  Experiment with all 4 patterns of &lt;CODE&gt;row=t/f&lt;/CODE&gt; and &lt;CODE&gt;col=t/f&lt;/CODE&gt;.  You may need to use &lt;CODE&gt;fillnull&lt;/CODE&gt; to add a header value on the last row.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 16:32:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373973#M169724</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-02T16:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373974#M169725</link>
      <description>&lt;P&gt;addtotals is great but adds a column at the end with the total ( great!) but when i go to chart the values, it includes the total as recorable item.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 16:40:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373974#M169725</guid>
      <dc:creator>cewing082</dc:creator>
      <dc:date>2018-05-02T16:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373975#M169726</link>
      <description>&lt;P&gt;Then do a sort on Total, afterwards use &lt;CODE&gt;| fields&lt;/CODE&gt; to remove it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 17:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373975#M169726</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-02T17:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373976#M169727</link>
      <description>&lt;P&gt;You can rename the field like this at the end and it will disappear from the chart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rename TOTAL AS _TOTAL
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 May 2018 18:38:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373976#M169727</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-02T18:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Total foreach Row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373977#M169728</link>
      <description>&lt;P&gt;Using &lt;CODE&gt;| addtotals label=_TOTAL&lt;/CODE&gt; should also be possible, right?&lt;/P&gt;

&lt;P&gt;Also - if you use sort, remember to use &lt;CODE&gt;| sort 0 _TOTAL&lt;/CODE&gt;, because by default sort is limited to 10000 results.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 21:16:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-foreach-Row/m-p/373977#M169728</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-02T21:16:42Z</dc:date>
    </item>
  </channel>
</rss>

