<?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 do I create a stacked bar chart with my data set? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207135#M60384</link>
    <description>&lt;P&gt;Thanks for that. &lt;/P&gt;

&lt;P&gt;the search that i am doing is a simple one. I have created a field extraction to extract the 2nd column of that table. &lt;/P&gt;

&lt;P&gt;So when you actually do a top limit=5  it shows that there are two types for it . &lt;/P&gt;

&lt;P&gt;Would it work then? &lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
Dan&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2015 18:38:27 GMT</pubDate>
    <dc:creator>dantu</dc:creator>
    <dc:date>2015-12-22T18:38:27Z</dc:date>
    <item>
      <title>How do I create a stacked bar chart with my data set?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207133#M60382</link>
      <description>&lt;P&gt;Hi Guys, &lt;/P&gt;

&lt;P&gt;I have the following data set that i retrieve using a search : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host           calltype       count

pc4bwsoap03 odata/v2       4931
pc4bwsoap03 sfapi/v1       134
pc4bwsoap03 api/oauth     13
pc4bwsoap03 xi/ajax     9
pc4bwsoap03 api/cdp     9
pc4bwsoap04 sfapi/v1    642
pc4bwsoap04 odata/v2      449
pc4bwsoap04 api/oauth     28
pc4bwsoap04 xi/ajax     24
pc4bwsoap04 api/cdp     23
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now in this you see the reappearance across multiple hosts of something like odata/v2 , sfapi/v1 &lt;/P&gt;

&lt;P&gt;Now how do I generate a stacked graph for this so that one of the axis is the host and it has one bar which represents the 2nd column instead of multiple bars? &lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
Dan&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 17:05:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207133#M60382</guid>
      <dc:creator>dantu</dc:creator>
      <dc:date>2015-12-22T17:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a stacked bar chart with my data set?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207134#M60383</link>
      <description>&lt;P&gt;Not sure of you main search, but this might help you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;your_search&amp;gt;  | contingency host calltype useother=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will provide a table of the counts by host and calltype. You can then use a Stacked bar chart to visualize the data.&lt;/P&gt;

&lt;P&gt;There is an alternative to &lt;CODE&gt;contingency&lt;/CODE&gt; in case you need to do a more advanced calculation. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_search&amp;gt; | chart sum(counts) by host over calltype 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should return the same table, to use in the graph.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 17:11:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207134#M60383</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-12-22T17:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a stacked bar chart with my data set?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207135#M60384</link>
      <description>&lt;P&gt;Thanks for that. &lt;/P&gt;

&lt;P&gt;the search that i am doing is a simple one. I have created a field extraction to extract the 2nd column of that table. &lt;/P&gt;

&lt;P&gt;So when you actually do a top limit=5  it shows that there are two types for it . &lt;/P&gt;

&lt;P&gt;Would it work then? &lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
Dan&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 18:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207135#M60384</guid>
      <dc:creator>dantu</dc:creator>
      <dc:date>2015-12-22T18:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a stacked bar chart with my data set?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207136#M60385</link>
      <description>&lt;P&gt;What is your search to generate this data?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 23:41:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207136#M60385</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-22T23:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a stacked bar chart with my data set?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207137#M60386</link>
      <description>&lt;P&gt;Ah ok, so I think you are pulling that table as a single event.  In that case:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_search_to_find_the_event&amp;gt; | rex field=_raw "(?&amp;lt;host&amp;gt;[^\s]+)\s+(?&amp;lt;calltype&amp;gt;[^\s]+)\s+(?&amp;lt;count&amp;gt;\d+)(?:[\r\n]+)?" max_match=0 | &amp;lt;contingency_or_chart_as above&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Dec 2015 01:57:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-stacked-bar-chart-with-my-data-set/m-p/207137#M60386</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-12-23T01:57:14Z</dc:date>
    </item>
  </channel>
</rss>

