<?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: Can we display the total count of all fields inside a panel? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229801#M68080</link>
    <description>&lt;P&gt;It seems I forgot one step, you need to make the token available outside your search. Here's a working example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;title&amp;gt;$total$&amp;lt;/title&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;| tstats count where index=_internal by sourcetype | eventstats sum(count) as _total&amp;lt;/query&amp;gt;
      &amp;lt;preview&amp;gt;
        &amp;lt;set token="total"&amp;gt;$result._total$&amp;lt;/set&amp;gt;
      &amp;lt;/preview&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Aug 2016 18:12:44 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2016-08-16T18:12:44Z</dc:date>
    <item>
      <title>Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229794#M68073</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is there any possibility to display total count of all fields inside a panel?&lt;/P&gt;

&lt;P&gt;We have pie chart that displays 5 fields with some values for each. Now we need to display something like "total" may be at top of the panel or bottom of the panel.&lt;/P&gt;

&lt;P&gt;Can you please suggest?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 00:43:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229794#M68073</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-08-16T00:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229795#M68074</link>
      <description>&lt;P&gt;This may be difficult. Check out this thread&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/91632/getting-a-count-of-the-number-of-fields-associated-with-a-sourcetype.html"&gt;https://answers.splunk.com/answers/91632/getting-a-count-of-the-number-of-fields-associated-with-a-sourcetype.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 00:53:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229795#M68074</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-16T00:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229796#M68075</link>
      <description>&lt;P&gt;If you compute the total in your search like so &lt;CODE&gt;| addtotals fieldname=_total&lt;/CODE&gt;, you can refer to &lt;CODE&gt;$result._total$&lt;/CODE&gt; in an HTML panel or a panel title.&lt;/P&gt;

&lt;P&gt;Note, that's assuming you have one row with five columns. If you have five rows with one column, you'll need to use &lt;CODE&gt;| eventstats sum(yourcolumn) as _total&lt;/CODE&gt; to compute the total.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 01:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229796#M68075</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-08-16T01:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229797#M68076</link>
      <description>&lt;P&gt;You could do something like this... Here is an example with &lt;CODE&gt;index=Internal&lt;/CODE&gt; but you should be able to adjust to your needs.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd_* | stats count by sourcetype | eventstats sum(count) as total | eval sourcetype=sourcetype." (".count."/".total.")" | fields - total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will display the total in the field name&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 01:56:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229797#M68076</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-16T01:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229798#M68077</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Please correct me if am wrong,&lt;/P&gt;

&lt;P&gt;You need a total count in the same panel of a pie chart?&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;It can be done using single value and pie chart in the same panel, here you need to use post process search picking total for single value and other values for pie chart.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Ex:-&lt;/P&gt;

&lt;P&gt;Base search &lt;/P&gt;

&lt;P&gt;..|eventstats sum(count) as Total|table Source,count,Total&lt;/P&gt;

&lt;P&gt;Dependent Search 1 (For Pie chart)&lt;/P&gt;

&lt;P&gt;table Source,count&lt;/P&gt;

&lt;P&gt;Dependent Search 2 (For Single Value)&lt;/P&gt;

&lt;P&gt;stats values(Total) as Total|table Total&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;If you don't want you use single value.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Use Java Script to find a total and set a token to display in the html tag inside a panel.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 06:33:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229798#M68077</guid>
      <dc:creator>Arun_N_007</dc:creator>
      <dc:date>2016-08-16T06:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229799#M68078</link>
      <description>&lt;P&gt;Hi,  we have 5 rows with one column and i used the latter to my search.&lt;BR /&gt;
    | eventstats sum(yourcolumn) as _total&lt;/P&gt;

&lt;P&gt;and tried calling this in my panel title $result._total$ as suggested, but value is not displaying in panel?&lt;/P&gt;

&lt;P&gt;Is there anything need to do?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 16:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229799#M68078</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-08-16T16:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229800#M68079</link>
      <description>&lt;P&gt;Hi ,&lt;BR /&gt;
Thanks, we are not looking to display in fieldname , instead some thing we are looking to display in title or some way inside panel is also fine?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 16:55:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229800#M68079</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-08-16T16:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229801#M68080</link>
      <description>&lt;P&gt;It seems I forgot one step, you need to make the token available outside your search. Here's a working example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;title&amp;gt;$total$&amp;lt;/title&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;| tstats count where index=_internal by sourcetype | eventstats sum(count) as _total&amp;lt;/query&amp;gt;
      &amp;lt;preview&amp;gt;
        &amp;lt;set token="total"&amp;gt;$result._total$&amp;lt;/set&amp;gt;
      &amp;lt;/preview&amp;gt;
    &amp;lt;/search&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Aug 2016 18:12:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229801#M68080</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-08-16T18:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229802#M68081</link>
      <description>&lt;P&gt;Hi tried this, value is not displaying in title, it is displaying as "$result._total$"?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 18:30:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229802#M68081</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-08-16T18:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229803#M68082</link>
      <description>&lt;P&gt;That's copied out of a working dashboard I built to check syntax etc., what exact XML are you using?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 19:02:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229803#M68082</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-08-16T19:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229804#M68083</link>
      <description>&lt;P&gt;Below is my sample xml code used for this dashboard.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;single&amp;gt;
             &amp;lt;title&amp;gt;$total$&amp;lt;/title&amp;gt;
            &amp;lt;search&amp;gt;
              &amp;lt;query&amp;gt;index=imdc_vms (sourcetype=hadoop:app:opera) (host=lgpbdpv035* OR host=lgpbdpv535* )  return_message="SUCCESS"   |eval Platform =if(sourcetype=="hadoop:app:opera", "OPERA","Fingerprint")   | search  Platform="*"  | eval item ="Success Requests" | stats dc(request_id) as Count by item,Platform | append [search  index=imdc_vms sourcetype=hadoop:app:tomcat:access source="*localhost_access_log*" (host=lgpbdpv035* OR host=lgpbdpv535* OR host=lgpbdpv050* OR host=lgpbdpv550*)  ( method=POST OR method =GET)  (uri="*opera*" OR uri ="*fingerprint*" )  | eval Platform=if(match(uri,".*opera.*"),"OPERA", "Fingerprint")   | search  Platform="*"  | eval item ="Total Requests" | stats count(uri) as Count by item,Platform | eval t_req= Count  ]  | append [search  index=imdc_vms sourcetype="hadoop:app:tomcat:catalina" ( host=lgpbdpv050* OR host=lgpbdpv550*)  "Call to Response * took *"  |eval Platform =if(sourcetype=="hadoop:app:opera", "OPERA","Fingerprint")   | search  Platform="*"  | eval item ="Success Requests" | stats dc(request_id) as Count by item,Platform | eval s_req= Count  ] | append [search index=imdc_vms sourcetype=hadoop:app:opera (host=lgpbdpv035* OR host=lgpbdpv535* )  ( EventDesc ="Got Request*" OR (EventDesc ="*Finished processing for request map*" AND tt_total &amp;amp;gt;1000) )  |eval Platform =if(sourcetype=="hadoop:app:opera", "OPERA","Fingerprint")    | search  Platform="*"  | eval item ="Error Requests" | transaction host pub_guid startswith="Got Request*" endswith="*Finished processing for request map*" maxevents=2 |stats count as Count by item,Platform  ] | eval Platform = Platform +":"+ item +": "+ Count
                | table  Platform, Count| eventstats sum(Count) as total|fields - Platform Count|head 1
               &amp;lt;/query&amp;gt;
              &amp;lt;progress&amp;gt;
             &amp;lt;set token="total"&amp;gt;$result.total$&amp;lt;/set&amp;gt;
           &amp;lt;/progress&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Aug 2016 19:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229804#M68083</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-08-16T19:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229805#M68084</link>
      <description>&lt;P&gt;Sigh... for some reason I pasted the wrong version - you'll need the preview search event handler, not progress... that one only has job properties. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/EventHandlerReference#preview"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/EventHandlerReference#preview&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 19:59:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229805#M68084</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-08-16T19:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can we display the total count of all fields inside a panel?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229806#M68085</link>
      <description>&lt;P&gt;awesome...that works.&lt;/P&gt;

&lt;P&gt;I used finalized.&lt;/P&gt;

&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 22:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-display-the-total-count-of-all-fields-inside-a-panel/m-p/229806#M68085</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-08-16T22:24:49Z</dc:date>
    </item>
  </channel>
</rss>

