<?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 create a pie chart of percentages out of just numeric token values? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254139#M15897</link>
    <description>&lt;P&gt;yup thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2016 17:18:51 GMT</pubDate>
    <dc:creator>smhsplunk</dc:creator>
    <dc:date>2016-10-14T17:18:51Z</dc:date>
    <item>
      <title>How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254126#M15884</link>
      <description>&lt;P&gt;Trying to do a pie chart out of just numeric values, getting values from different tokens and using them for this piechart, I just want to show them as % of the entire sum of numeric token values. How do you create a list of values for piechart?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host="*"
| eval token1="$token1$"
| eval token2="$token2$"
| eval token3="$token3$"
| eval token4 = "$token4$"
| eval token_times = list(token1, token2, token3, token4)
| stats values by token_times
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Oct 2016 22:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254126#M15884</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-13T22:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254127#M15885</link>
      <description>&lt;P&gt;Need a mvexpand in there to create 4 rows each with ts own token value before you take to pie chart...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  ... (Your 1st 4 evals) ...
  | eval a=mvzip(token1,token2) | eval b=mvzip(token3,token4) | eval allTokens=mvzip(a,b) | mvexpand allTokens | eval count=allTokens | stats count by allTokens
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Oct 2016 23:11:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254127#M15885</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-10-13T23:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254128#M15886</link>
      <description>&lt;P&gt;You may be able to skip the first 4 evals if you use the tokens in the mvzips instead&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 23:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254128#M15886</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-10-13T23:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254129#M15887</link>
      <description>&lt;P&gt;Its giving me a piechart with a single color and single label "token1,token2,token2..."&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 23:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254129#M15887</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-13T23:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254130#M15888</link>
      <description>&lt;P&gt;What search did you end up with?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 01:11:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254130#M15888</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-10-14T01:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254131#M15889</link>
      <description>&lt;P&gt;Wait, what value is supposed to fill the pieces of the pie and what label should label the pie pieces?&lt;/P&gt;

&lt;P&gt;Your providing one value for each field via the token.  I assume you want that as the value/count.  So then token1, token2, token3, and token4 should be the labels?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 01:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254131#M15889</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-10-14T01:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254132#M15890</link>
      <description>&lt;P&gt;Maybe this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=main host="*" | eval token1="$token1$"| eval token2="$token2$"| eval token3="$token3$"| eval token4 = "$token4$"| chart values(token*) by token*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Oct 2016 01:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254132#M15890</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-10-14T01:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254133#M15891</link>
      <description>&lt;P&gt;Please see this simplified example (this doesnt work)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host="*"
             | eval token1=10
              | eval token2=20
              | eval token3=30 | stats values(token*) by token*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so I would like the piechart to have labels 10 (20% slice), 20 (40% slice) and 30 (60% slice)&lt;BR /&gt;
The correct slices are more important than labels i guess..&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254133#M15891</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-14T14:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254134#M15892</link>
      <description>&lt;P&gt;I think something like this would work (first line is just to generate a single row where token fields can be created)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 
| eval token1="$token1$"
 | eval token2="$token2$"
 | eval token3="$token3$"
 | eval token4 = "$token4$"
| table token*  | eval token=1 | untable token tokens value | table tokens value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:55:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254134#M15892</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-14T14:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254135#M15893</link>
      <description>&lt;P&gt;This again gives me a table with all values, but when I try to convert it into a piechart using visualization it shows a single color for the entire piechart (currently it shows)&lt;/P&gt;

&lt;P&gt;token0: 0 &lt;BR /&gt;
token1: 55%&lt;BR /&gt;
token1%: 100%&lt;/P&gt;

&lt;P&gt;I don't have pie slices per tokens&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254135#M15893</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-14T15:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254136#M15894</link>
      <description>&lt;P&gt;Try updated answer.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:30:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254136#M15894</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-14T15:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254137#M15895</link>
      <description>&lt;P&gt;This is great, this works, last question is it possible to change the token names after the last line, I tried to do  but it retains the old token labels as token1, token2... &lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254137#M15895</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-14T15:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254138#M15896</link>
      <description>&lt;P&gt;What do you want it to be changed as? I guess you can just create the field with the name you want at the first place and you should be good (update token name in eval and table command)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:08:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254138#M15896</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-14T16:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a pie chart of percentages out of just numeric token values?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254139#M15897</link>
      <description>&lt;P&gt;yup thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 17:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-pie-chart-of-percentages-out-of-just-numeric/m-p/254139#M15897</guid>
      <dc:creator>smhsplunk</dc:creator>
      <dc:date>2016-10-14T17:18:51Z</dc:date>
    </item>
  </channel>
</rss>

