<?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 include another field into the visual in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488575#M31998</link>
    <description>&lt;P&gt;Try like this (assuming calculation of count independently for both conditions). You didn't provide a query for calculation of category=221, I'm just using filter based on field category, adjust the query per yours)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=url_filter (action=blocked login_id="$user$") OR (category=221)
| eval CountBlocked=if(action="blocked",1,0) , CountCat221=if(category=221,1,0)
| timechart span=1h sum(CountBlocked) as CountBlocked sum(CountCat221) as CountCat221
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 06 Mar 2020 22:00:38 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2020-03-06T22:00:38Z</dc:date>
    <item>
      <title>How to include another field into the visual</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488573#M31996</link>
      <description>&lt;P&gt;I'm working with dashboards and the goal is to show a bar graph panel that displays the counts for two different fields separately &lt;BR /&gt;
(2 bars per timespan)  if possible. &lt;BR /&gt;
The data is from the same index...the actions field(action=blocked) and category field (category=221)&lt;/P&gt;

&lt;P&gt;I can build a visual for each individual field but having trouble combining the two.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=url_filter action=blocked login_id="$user$"|stats count by _time |bucket _time span=1h 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have another field not exclusive to field [action=blocked] that id like to display as well. &lt;BR /&gt;
Any tips appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 20:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488573#M31996</guid>
      <dc:creator>kelie</dc:creator>
      <dc:date>2020-03-06T20:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to include another field into the visual</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488574#M31997</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="url_filter" AND login_id="$user$" AND (action="blocked" OR category="221")
| bucket _time span=1h
| stats count(eval(action="blocked")) AS blocked count(eval(category="221")) AS count221 BY _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="url_filter" AND login_id="$user$" AND (action="blocked" OR category="221")
| timechart span=1h count(eval(action="blocked")) AS blocked count(eval(category="221")) AS count221
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 21:54:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488574#M31997</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-06T21:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to include another field into the visual</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488575#M31998</link>
      <description>&lt;P&gt;Try like this (assuming calculation of count independently for both conditions). You didn't provide a query for calculation of category=221, I'm just using filter based on field category, adjust the query per yours)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=url_filter (action=blocked login_id="$user$") OR (category=221)
| eval CountBlocked=if(action="blocked",1,0) , CountCat221=if(category=221,1,0)
| timechart span=1h sum(CountBlocked) as CountBlocked sum(CountCat221) as CountCat221
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 22:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488575#M31998</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-03-06T22:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to include another field into the visual</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488576#M31999</link>
      <description>&lt;P&gt;sorry for leaving it out but a sample search for category would have been &lt;/P&gt;

&lt;P&gt;index=url_filter category=221 login_id="$user$"|stats count by _time |bucket _time span=1h&lt;/P&gt;

&lt;P&gt;these answers have definitely put me on the right track with the eval&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488576#M31999</guid>
      <dc:creator>kelie</dc:creator>
      <dc:date>2020-09-30T04:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to include another field into the visual</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488577#M32000</link>
      <description>&lt;P&gt;Do the &lt;CODE&gt;bucket&lt;/CODE&gt; earlier.  See my answer.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 22:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488577#M32000</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-06T22:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to include another field into the visual</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488578#M32001</link>
      <description>&lt;P&gt;this solution worked and is simplified, than you both for the answers&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488578#M32001</guid>
      <dc:creator>kelie</dc:creator>
      <dc:date>2020-03-09T16:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to include another field into the visual</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488579#M32002</link>
      <description>&lt;P&gt;Be sure to come back here and click &lt;CODE&gt;Accept&lt;/CODE&gt; to close the question and also &lt;CODE&gt;UpVote&lt;/CODE&gt; any answers or comments that were useful.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 17:43:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-another-field-into-the-visual/m-p/488579#M32002</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-09T17:43:20Z</dc:date>
    </item>
  </channel>
</rss>

