<?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: Hi , I want to show the data in pie-chart based on the different search result. in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465006#M30531</link>
    <description>&lt;P&gt;Please explain how the new query is not working.  What results do you expect and what results do you get?&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;case&lt;/CODE&gt; function returns the first matching expression.  If an event contains both message="test data order"' and 'path=/test/orders' then result will be set to "Order Data".&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 12:42:01 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-05-26T12:42:01Z</dc:date>
    <item>
      <title>Hi , I want to show the data in pie-chart based on the different search result.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465005#M30530</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;Currently I have below query which works fine for pie-chart for 3 different data , which is working fine.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;"*test-path*" | bucket span=1d _time | rename test-path as path | eval result=case((path == "/test/orders"), "Order Data" , (path == "/test-data/orders"), "test order" , (path == "/test2-data2/orders/"), "Test data") | chart count by result | eval result = count + " " + result | fields result, count
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but i want to extend it by adding 1 more search "test data for order - path" which is coming in the &lt;STRONG&gt;message&lt;/STRONG&gt; key, I have tried below but not working:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;"*test-path*" | bucket span=1d _time | rename test-path as path | **rename message as msg** | eval result=case((path == "/test/orders"), "Order Data" , (path == "/test-data/orders"), "test order" , (path == "/test2-data2/orders/"), "Test data" , (**msg == "*test data for order - path***"), "test data order") | chart count by result | eval result = count + " " + result | fields result, count
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can anyone plz help.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 23:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465005#M30530</guid>
      <dc:creator>neha_h</dc:creator>
      <dc:date>2020-06-07T23:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hi , I want to show the data in pie-chart based on the different search result.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465006#M30531</link>
      <description>&lt;P&gt;Please explain how the new query is not working.  What results do you expect and what results do you get?&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;case&lt;/CODE&gt; function returns the first matching expression.  If an event contains both message="test data order"' and 'path=/test/orders' then result will be set to "Order Data".&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 12:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465006#M30531</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-26T12:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hi , I want to show the data in pie-chart based on the different search result.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465007#M30532</link>
      <description>&lt;P&gt;@richgalloway , &lt;BR /&gt;
this is my raw splunk events:-&lt;BR /&gt;
 message: Source :undefined, test Id :"76767676-ef2c-4bec-454-666111598873", &lt;STRONG&gt;msg&lt;/STRONG&gt; : test data for order - path&lt;BR /&gt;
 extras-path: /test-data/orders&lt;BR /&gt;
 extras-path: /test/orders&lt;BR /&gt;
so i can evaluate path with above query but not sure how to evaluate msg (since msg is inside message) and display it's count in the same pie-chart&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 09:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465007#M30532</guid>
      <dc:creator>neha_h</dc:creator>
      <dc:date>2020-05-29T09:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hi , I want to show the data in pie-chart based on the different search result.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465008#M30533</link>
      <description>&lt;P&gt;Thank you for sharing the sample event.  You still haven't described your expected and actual results.&lt;BR /&gt;
Please run this query to verify the fields are as expected.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"*test-path*" | bucket span=1d _time | rename test-path as path | rename message as msg | table path msg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2020 12:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hi-I-want-to-show-the-data-in-pie-chart-based-on-the-different/m-p/465008#M30533</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-29T12:54:48Z</dc:date>
    </item>
  </channel>
</rss>

