<?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: help for formatting a pie chart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447030#M29379</link>
    <description>&lt;P&gt;Did you mean to click &lt;CODE&gt;Answer&lt;/CODE&gt;?  It doesn't really make sense to, if you cannot test it.&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2019 19:17:29 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-05-13T19:17:29Z</dc:date>
    <item>
      <title>help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447023#M29372</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I use the search below in order to display the data in a pie chart&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup host.csv 
| lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT BatteryTemp00 
| where BatteryTemp00 &amp;gt; 30 
| stats count as NbHostBattSup30
| appendcols 
    [| inputlookup host.csv 
    | stats count as NbIndHost] 
| eval NbHostBattInf30 = (NbIndHost - NbHostBattSup30) 
| eval NbHostBattSup30=NbHostBattSup30, NbHostBattInf30=NbHostBattInf30 
| table NbHostBattSup30 NbHostBattInf30
| transpose
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to just display one decimal&lt;BR /&gt;
So I do this but it doesn't works&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | eval NbHostBattSup30=round(NbHostBattSup30, 1), NbHostBattInf30=round(NbHostBattInf30, 1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would also have the result in bold and to display the integer value in addition to the percentage&lt;BR /&gt;
could you help me please??&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2019 06:22:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447023#M29372</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-05-04T06:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447024#M29373</link>
      <description>&lt;P&gt;Try this on your default _audit index.&lt;BR /&gt;
Copy paste this code and run &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_audit" 
| stats count by info
| eventstats sum(count) as count1
| eval perc=round(count*100/count1,1)
| eval info=info+"-"+"count:"+count+","+"percentage:"+perc
| fields info,perc
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 May 2019 08:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447024#M29373</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-05-04T08:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447025#M29374</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup host.csv 
| lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT BatteryTemp00 
| where BatteryTemp00 &amp;gt; 30 
| stats count as NbHostBattSup30
| appendcols 
[| inputlookup host.csv 
| stats count as NbIndHost] 
| eval NbHostBattInf30 = (NbIndHost - NbHostBattSup30) 
| eval NbHostBattSup30=NbHostBattSup30, NbHostBattInf30=NbHostBattInf30 
| table NbHostBattSup30 NbHostBattInf30 
| untable foo key value
| fields - foo
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 May 2019 20:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447025#M29374</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-04T20:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447026#M29375</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
with this, I have any percentage...&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 06:11:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447026#M29375</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-05-07T06:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447027#M29376</link>
      <description>&lt;P&gt;I have no right on this index and I try to adapt your code in mine but it doesnt works...&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 06:20:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447027#M29376</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-05-07T06:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447028#M29377</link>
      <description>&lt;P&gt;Hi @jip31 - Can you not install the free splunk enterprise  on your local and try out the above code?&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2019 08:33:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447028#M29377</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-05-11T08:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447029#M29378</link>
      <description>&lt;P&gt;More words.&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2019 19:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447029#M29378</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-11T19:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: help for formatting a pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447030#M29379</link>
      <description>&lt;P&gt;Did you mean to click &lt;CODE&gt;Answer&lt;/CODE&gt;?  It doesn't really make sense to, if you cannot test it.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 19:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-for-formatting-a-pie-chart/m-p/447030#M29379</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-13T19:17:29Z</dc:date>
    </item>
  </channel>
</rss>

