<?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: Multi-variable Bar Graph in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336013#M21767</link>
    <description>&lt;P&gt;Heh.  I need to practice typing &lt;CODE&gt;| stats count(eval(blahblahblah))&lt;/CODE&gt; until I have convinced myself that the code will actually run...&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2017 00:05:34 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-06-06T00:05:34Z</dc:date>
    <item>
      <title>Multi-variable Bar Graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336010#M21764</link>
      <description>&lt;P&gt;Hi I am trying to make a multi-variable bar graph (Similar to the image below)&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3037i803096A753404FF1/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The first bar would be a static number: 22500&lt;/P&gt;

&lt;P&gt;The second bar would be this search:&lt;BR /&gt;
 &lt;CODE&gt;| inputlookup Report.csv | search u_last_policyrequest_time=*| fields u_last_policyrequest_time| eval Last_Policy_Request = strptime(u_last_policyrequest_time, "%m/%d/%Y %H:%M") | where Last_Policy_Request &amp;gt; relative_time(now(),"-48h")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The third bar would be this search: &lt;CODE&gt;|inputlookup Report.csv|rename u_wifi_mac_address as Mac_Address | stats count as ActiveDevices by Mac_Address|stats sum(ActiveDevices) as SNTotal_Asset_Records|table SNTotal_Asset_Records&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The fourth bar would be this search: &lt;CODE&gt;|inputlookup Report.csv|rename u_wifi_mac_address as Mac_Address | stats count as ActiveDevices by Mac_Address|stats sum(ActiveDevices) as ActiveDevices | eval No_Record = 22500-ActiveDevices |table No_Record&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I am not sure if it is possible to combine them like this. All of these results come from the same place.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 19:39:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336010#M21764</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2017-06-05T19:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-variable Bar Graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336011#M21765</link>
      <description>&lt;P&gt;Lots of ways to do this, here's one...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Report.csv 
| search u_last_policyrequest_time=*  OR isnotnull(u_wifi_mac_address)
| eval Last_Policy_Request = strptime(u_last_policyrequest_time, "%m/%d/%Y %H:%M") 
| eval policyCount=if(Last_Policy_Request &amp;gt; relative_time(now(),"-48h"),1,0)
| eval macCount=if(isnotnull(u_wifi_mac_address),1,0)
| stats sum(policyCount) as bar2, sum(macCount) as bar3
| eval bar1=22500
| eval bar4=bar1-bar3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Jun 2017 21:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336011#M21765</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-05T21:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-variable Bar Graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336012#M21766</link>
      <description>&lt;P&gt;Another version&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Report.csv
| stats count(eval(strptime(u_last_policyrequest_time,"%m/%d/%Y %H:%M")&amp;gt;relative_time(now(),"-48h")))) as Policy_Request_last2days
count(Mac_Address) as SNTotal_Asset_Records
| eval No_Record=22500-SNTotal_Asset_Records
| eval BaseBar=22500
| table BaseBar Policy_Request_last2days SNTotal_Asset_Records No_Record
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Jun 2017 22:11:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336012#M21766</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-05T22:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-variable Bar Graph</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336013#M21767</link>
      <description>&lt;P&gt;Heh.  I need to practice typing &lt;CODE&gt;| stats count(eval(blahblahblah))&lt;/CODE&gt; until I have convinced myself that the code will actually run...&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 00:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Multi-variable-Bar-Graph/m-p/336013#M21767</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-06T00:05:34Z</dc:date>
    </item>
  </channel>
</rss>

