<?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: How to show count &amp;amp; percentage of the total count in a chart command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609660#M211990</link>
    <description>&lt;P&gt;Thank you very much for the explanation bowesmana.&lt;/P&gt;&lt;P&gt;So i took your SPL (above) and tried running it in my environment, but unfortunately the result is blank and that may be related to the comment u made regarding count turning into a non numeric value. So does this mean there is no solution for this in splunk? Again thanks for your reply!&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 15:14:04 GMT</pubDate>
    <dc:creator>djoobbani</dc:creator>
    <dc:date>2022-08-16T15:14:04Z</dc:date>
    <item>
      <title>How to show count &amp; percentage of the total count in a chart command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609559#M211947</link>
      <description>&lt;P&gt;Dear splunk community:&lt;/P&gt;
&lt;P&gt;So i am using the following chart command:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;lt;base search&amp;gt;&amp;nbsp;| chart count by url_path, http_status_code |&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;addtotals col=true&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;to get the following search result: URL (Y-Axis) &amp;amp; http status code (X-Axis)&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;200 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;400 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;500 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;502 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;Total&lt;/P&gt;
&lt;P class=""&gt;url1&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;15&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;5&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;5 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;5 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;30&lt;/P&gt;
&lt;P class=""&gt;url2&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;10 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;3&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;6&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;2 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;21&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;25 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;8&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;11 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;7 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;51&lt;/P&gt;
&lt;P class=""&gt;Now i need to add the percentage of each count based on the total number and display the count &amp;amp; percentage together like so:&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;200 &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;400&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;500&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;502&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;Total&lt;/P&gt;
&lt;P class=""&gt;url1&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;15 (50%)&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;5 (16%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;5 (16%)&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;5(16%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;30&lt;/P&gt;
&lt;P class=""&gt;url2&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;10 (47%)&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;3 (14%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;6 (28%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;2 (9%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;21&lt;/P&gt;
&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;25 (49%)&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;8 (15%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;11 (21%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;7 (13%) &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;51&lt;/P&gt;
&lt;P class=""&gt;Can someone show me how to achieve this? Greatly appreciate your help in advance!&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:05:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609559#M211947</guid>
      <dc:creator>djoobbani</dc:creator>
      <dc:date>2022-08-16T13:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to show count &amp; percentage of the total count in a chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609563#M211950</link>
      <description>&lt;P&gt;As I suggested in my post to the same question you asked in your other post &lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-get-the-chart-of-count-and-percentage-by-in-one-column/m-p/609547#M211942" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-get-the-chart-of-count-and-percentage-by-in-one-column/m-p/609547#M211942&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you can combine the percentage using the SPL I posted there, which gives you exactly the table you display here, see this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1660622918899.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21039i9D04A1C9891C39FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1660622918899.png" alt="bowesmana_0-1660622918899.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, as soon as you turn a count into a non numeric value, it is no longer a numeric value, so Splunk will not chart that as a vertical Y-axis value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 04:08:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609563#M211950</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-16T04:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to show count &amp; percentage of the total count in a chart command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609660#M211990</link>
      <description>&lt;P&gt;Thank you very much for the explanation bowesmana.&lt;/P&gt;&lt;P&gt;So i took your SPL (above) and tried running it in my environment, but unfortunately the result is blank and that may be related to the comment u made regarding count turning into a non numeric value. So does this mean there is no solution for this in splunk? Again thanks for your reply!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 15:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609660#M211990</guid>
      <dc:creator>djoobbani</dc:creator>
      <dc:date>2022-08-16T15:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to show count &amp; percentage of the total count in a chart command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609731#M212012</link>
      <description>&lt;P&gt;Blank results might mean you have no permission to view _internal index...&lt;/P&gt;&lt;P&gt;However,&amp;nbsp; I am not aware of any way to append some text to a number and for Splunk to then plot that numerically. One thought it that if you add data values ON to the chart, whether with some Javascript and CSS you could dynamically change the visible text to add the percentage, but I don't know how to do that.&lt;/P&gt;&lt;P&gt;See this developer tools view of the &amp;lt;tspan&amp;gt; element showing the data label of the graph value. I suspect this IS possible, but you would need to have the CSS and probably Javascript knowledge to do it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1660699178478.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21061i87E74BCD321664EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1660699178478.png" alt="bowesmana_0-1660699178478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 01:19:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-count-amp-percentage-of-the-total-count-in-a-chart/m-p/609731#M212012</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-17T01:19:50Z</dc:date>
    </item>
  </channel>
</rss>

