<?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 How to create a pie chart with specific field values? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399693#M26184</link>
    <description>&lt;P&gt;Hi, here is a sample lookup file's table/csv:&lt;/P&gt;

&lt;P&gt;sample.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Animal  Color
horse    black
horse    Grey
horse    Orange
horse    Grey
horse    Grey
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I display ONLY the colors black vs. grey in a pie chart with their respective percentages? My below code only shows a single-colored pie chart and their count.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup sample.csv
|chart
   count(eval(color = "black" )) as Noir
   count(eval(color = "grey")) as Gris
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 25 Sep 2018 19:35:30 GMT</pubDate>
    <dc:creator>russell120</dc:creator>
    <dc:date>2018-09-25T19:35:30Z</dc:date>
    <item>
      <title>How to create a pie chart with specific field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399693#M26184</link>
      <description>&lt;P&gt;Hi, here is a sample lookup file's table/csv:&lt;/P&gt;

&lt;P&gt;sample.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Animal  Color
horse    black
horse    Grey
horse    Orange
horse    Grey
horse    Grey
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I display ONLY the colors black vs. grey in a pie chart with their respective percentages? My below code only shows a single-colored pie chart and their count.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup sample.csv
|chart
   count(eval(color = "black" )) as Noir
   count(eval(color = "grey")) as Gris
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:35:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399693#M26184</guid>
      <dc:creator>russell120</dc:creator>
      <dc:date>2018-09-25T19:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart with specific field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399694#M26185</link>
      <description>&lt;P&gt;Hi @russell120 &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup sample.csv |where Color in ("black","grey") |stats count by color
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If my answer helped pls upvote or accept as answer.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:47:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399694#M26185</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-25T19:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart with specific field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399695#M26186</link>
      <description>&lt;P&gt;@harishalipaka This allows a table to be shown where Color are either of those values, but when I select the Pie Char visulization button, there are no results. The empty grey pie chart says Numeric Data Required.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399695#M26186</guid>
      <dc:creator>russell120</dc:creator>
      <dc:date>2018-09-25T19:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart with specific field values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399696#M26187</link>
      <description>&lt;P&gt;Nevermind! I added&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count by Color
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to the end and it worked!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 19:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-with-specific-field-values/m-p/399696#M26187</guid>
      <dc:creator>russell120</dc:creator>
      <dc:date>2018-09-25T19:59:28Z</dc:date>
    </item>
  </channel>
</rss>

