<?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 doing a pie chart from 2 subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486771#M193735</link>
    <description>&lt;P&gt;Hi jip31,&lt;BR /&gt;
Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`test` 
 [ | inputlookup host.csv 
   | table host 
   | rename host as USERNAME ] 
| lookup aps.csv NAME as AP_NAME OUTPUT Building  
| lookup cmdb.csv HOSTNAME as USERNAME output BUILDING_DESCRIPTION
| search NOT (Building = BUILDING_DESCRIPTION)
| stats count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2019 15:23:16 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2019-09-27T15:23:16Z</dc:date>
    <item>
      <title>help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486769#M193733</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;I have the search below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`test` 
    [| inputlookup host.csv 
    | table host 
    | rename host as USERNAME ] 
| lookup aps.csv NAME as AP_NAME OUTPUT Building  
| lookup cmdb.csv HOSTNAME as USERNAME output BUILDING_DESCRIPTION
| stats last(Building) as BuildingAP, last(BUILDING_DESCRIPTION) as BuildingIT 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I need is to do a pie chart in order to have the percentage of the events where BuildingAP doesnt match with BuildingIT&lt;BR /&gt;
So first, I have to write this where condition &lt;BR /&gt;
After I need to count the number of events corresponding to this where condition and to count also the total number of events (events without the where condition) in order to have 2 news fields which allows doing a pie chart&lt;BR /&gt;
but pearhaps there is another solution?&lt;BR /&gt;
For summarize I need a pie chart with 2 label in %, one which calculate the % of events where BuildingAP is not equal to BuildingIT and another which is the equal tio the total % of events - the % the previous count&lt;BR /&gt;
Is anybody cant help me please??&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 14:37:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486769#M193733</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-27T14:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486770#M193734</link>
      <description>&lt;P&gt;Try something like this and change according to what you are trying to compare:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; `test` 
     [| inputlookup host.csv 
     | table host 
     | rename host as USERNAME ] 
| lookup aps.csv NAME as AP_NAME OUTPUT Building  
| lookup cmdb.csv HOSTNAME as USERNAME output BUILDING_DESCRIPTION
| eval isEqual = case(Building = BUILDING_DESCRIPTION,"true","false")
| stats count by isEqual 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Sep 2019 14:51:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486770#M193734</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-09-27T14:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486771#M193735</link>
      <description>&lt;P&gt;Hi jip31,&lt;BR /&gt;
Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`test` 
 [ | inputlookup host.csv 
   | table host 
   | rename host as USERNAME ] 
| lookup aps.csv NAME as AP_NAME OUTPUT Building  
| lookup cmdb.csv HOSTNAME as USERNAME output BUILDING_DESCRIPTION
| search NOT (Building = BUILDING_DESCRIPTION)
| stats count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:23:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486771#M193735</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-09-27T15:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486772#M193736</link>
      <description>&lt;P&gt;Hi &lt;BR /&gt;
it doesnt works&lt;BR /&gt;
I have the message " Error in 'eval' command: The arguments to the 'case' function are invalid."&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 06:43:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486772#M193736</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-30T06:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486773#M193737</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
I have no results (pie empty only....)&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 06:46:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486773#M193737</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-30T06:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486774#M193738</link>
      <description>&lt;P&gt;Is anybody has an idea please??&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 05:58:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486774#M193738</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-10-01T05:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486775#M193739</link>
      <description>&lt;P&gt;Ii there somebody for helping me please??&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 05:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486775#M193739</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-10-02T05:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: help for doing a pie chart from 2 subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486776#M193740</link>
      <description>&lt;P&gt;can you try again? there was a typo on the case arguments (missing ")&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 22:58:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-for-doing-a-pie-chart-from-2-subsearch/m-p/486776#M193740</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-10-06T22:58:29Z</dc:date>
    </item>
  </channel>
</rss>

