<?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 name the addcoltotals field in a bar chart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233318#M69263</link>
    <description>&lt;P&gt;Hi  vrmandadi,&lt;/P&gt;

&lt;P&gt;Try with &lt;CODE&gt;fillnull&lt;/CODE&gt; command to have a name for it like follow in your bar graph&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; .....| chart  count by TYPE | addcoltotals labelfield=total |fillnull value=TOTAL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or you can try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.....| chart  count by TYPE | addcoltotals labelfield=TYPE label=total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Mar 2016 01:52:34 GMT</pubDate>
    <dc:creator>ngatchasandra</dc:creator>
    <dc:date>2016-03-04T01:52:34Z</dc:date>
    <item>
      <title>Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233312#M69257</link>
      <description>&lt;P&gt;I ran this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.....| chart  count by TYPE | addcoltotals labelfield=total 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and got these results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;type    count     total
a         2
b         2
c         2          
          6       total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I visualized the above result in a bar chart, but the total field does not have any name to it like a or b or c .....is there any way that the bar chart can have a name called total?       &lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 20:19:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233312#M69257</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-03T20:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233313#M69258</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | chart count by TYPE | addcoltotals | eval TYPE=coalesce(TYPE,"total")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | chart count by TYPE | appendpipe [| stats sum(count) as count | eval TYPE="total"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;BR /&gt;
Total as separate series/column&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  your base search | chart count by TYPE | eventstats sum(count) as total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Mar 2016 21:31:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233313#M69258</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-03T21:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233314#M69259</link>
      <description>&lt;P&gt;hi,  &lt;/P&gt;

&lt;P&gt;try like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | chart count by TYPE |addcoltotals labelfield=TOTAL label=Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Mar 2016 21:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233314#M69259</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2016-03-03T21:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233315#M69260</link>
      <description>&lt;P&gt;This is same as the search i typed and the result is the same,,when I see the bar graph I cannot see the name for it&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 22:06:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233315#M69260</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-03T22:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233316#M69261</link>
      <description>&lt;P&gt;Hi Somesh,&lt;/P&gt;

&lt;P&gt;I tried using the above two searches but none of  them gave me name on the bar graph ,the second search   adds all total and again adds the total with the above count.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 22:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233316#M69261</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-03T22:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233317#M69262</link>
      <description>&lt;P&gt;Both the search should give an output like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;type count
a         2
b         2
c         2 
total   6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both column and bar chart gives me a bar/column with name total. I guess you're talking about the legend where the name of series is only &lt;CODE&gt;count&lt;/CODE&gt;. If you want to have total as separate series, try the updated answer.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 22:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233317#M69262</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-03T22:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233318#M69263</link>
      <description>&lt;P&gt;Hi  vrmandadi,&lt;/P&gt;

&lt;P&gt;Try with &lt;CODE&gt;fillnull&lt;/CODE&gt; command to have a name for it like follow in your bar graph&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; .....| chart  count by TYPE | addcoltotals labelfield=total |fillnull value=TOTAL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or you can try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.....| chart  count by TYPE | addcoltotals labelfield=TYPE label=total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Mar 2016 01:52:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233318#M69263</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2016-03-04T01:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233319#M69264</link>
      <description>&lt;P&gt;haven't done any testing but what if you set labelfield to TYPE&lt;/P&gt;

&lt;P&gt;.... | addcoltotals labelfield=TYPE&lt;/P&gt;

&lt;P&gt;So that you end up with data that looks like this instead&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TYPE       count
 a               2
 b               2
 c               2          
 total         6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since you are chart'ing by TYPE, I don't think you'd see a new field you named total&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 02:37:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233319#M69264</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-03-04T02:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233320#M69265</link>
      <description>&lt;P&gt;thanks a lot the first query worked just with a small change &lt;/P&gt;

&lt;P&gt;chart  count by TYPE | addcoltotals labelfield=total |fillnull value=TOTAL |fields -total&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 19:45:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233320#M69265</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-04T19:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233321#M69266</link>
      <description>&lt;P&gt;| chart  count by MESSAGE_TYPE | addcoltotals labelfield=total |fillnull value=TOTAL |fields- total&lt;/P&gt;

&lt;P&gt;this worked...the updated query gives a separate column total and each row is having the the total&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 19:47:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233321#M69266</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2016-03-04T19:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can we name the addcoltotals field in a bar chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233322#M69267</link>
      <description>&lt;P&gt;Thanks vrmandadi,&lt;/P&gt;

&lt;P&gt;I see that you sent me also points. You  could also do it by just vote has left my response&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 13:00:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-name-the-addcoltotals-field-in-a-bar-chart/m-p/233322#M69267</guid>
      <dc:creator>ngatchasandra</dc:creator>
      <dc:date>2016-03-07T13:00:54Z</dc:date>
    </item>
  </channel>
</rss>

