<?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 edit my search to display a timechart showing the percentage of OS usage per month over several months? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250458#M74800</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;index=marketing_summary_sp|eventstats count as total|bucket _time as month span=1mon|stats max(total) as total count by ua_os_family month|eval Percentage=round((count/total)*100,0)."%"|chart values(Percentage) by ua_os_family month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;something like that might get you what you're looking for, or you could try with date_month&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=marketing_summary_sp|eventstats count as total|stats max(total) as total count by ua_os_family date_month|eval Percentage=round((count/total)*100,0)."%"|chart values(Percentage) by ua_os_family date_month
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Nov 2016 16:23:55 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2016-11-29T16:23:55Z</dc:date>
    <item>
      <title>How to edit my search to display a timechart showing the percentage of OS usage per month over several months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250457#M74799</link>
      <description>&lt;P&gt;Hey there, I'm scratching my head trying to figure out how to do this. &lt;/P&gt;

&lt;P&gt;Basically, I want to run a report on 6 months of browsing data and be able to view the percentage of usage on different operating systems (Windows 7, OS X, etc) per month over several months. It would hopefully look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;OS             August   September   October
Windows 7       68%    70%        70%
Windows 10       3%     5%         6%
Linux           10%    8%          7%
Windows 8.1      9%     8%         8%
MacOS           4%      4%         4%
Windows XP       2%     2%         2%
iPad             1%     1%         1%
Chrome OS       0%      0%         0%
Android OS       0%     0%         0%
Windows Vista   1%      1%         1%
Windows 8       1%      1%         1%
iPhone         0%       0%         0%
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The closest I can get is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=marketing_summary_sp | timechart span=1mon count by ua_os_family limit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That basically gives me the "count" of individual OS sessions per month but not the percentages. The only fields I think that would be involved are date_month and ua_os_family. I just can't figure out how to give per month percentages while also showing several other months. Thoughts?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:57:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250457#M74799</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2020-09-29T11:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to display a timechart showing the percentage of OS usage per month over several months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250458#M74800</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=marketing_summary_sp|eventstats count as total|bucket _time as month span=1mon|stats max(total) as total count by ua_os_family month|eval Percentage=round((count/total)*100,0)."%"|chart values(Percentage) by ua_os_family month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;something like that might get you what you're looking for, or you could try with date_month&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=marketing_summary_sp|eventstats count as total|stats max(total) as total count by ua_os_family date_month|eval Percentage=round((count/total)*100,0)."%"|chart values(Percentage) by ua_os_family date_month
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Nov 2016 16:23:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250458#M74800</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2016-11-29T16:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to display a timechart showing the percentage of OS usage per month over several months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250459#M74801</link>
      <description>&lt;P&gt;Neither of these work unfortunately because they give the percentage spread across all months, rather than the percentage per month. For example, I would expect Windows 7 usage to be around 70% each month but using the above searches over a period of 3 months shows the percentage at around 23% per month (so it is giving a percentage per month across all months, rather than per month).&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 16:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250459#M74801</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-11-29T16:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to display a timechart showing the percentage of OS usage per month over several months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250460#M74802</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; index=marketing_summary_sp|bucket _time as month span=1mon|eventstats count as total by month|stats max(total) as total count by ua_os_family month|eval Percentage=round((count/total)*100,0)."%"|chart values(Percentage) by ua_os_family month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sorry, i should have added the eventstats to be by month. that might help. or something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=marketing_summary_sp|bucket _time as month span=1mon|stats count by ua_os_family month|eventstats sum(count) as total by month|eval Percentage=round((count/total)*100,0)."%"|chart values(Percentage) by ua_os_family month
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Nov 2016 17:03:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250460#M74802</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2016-11-29T17:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to display a timechart showing the percentage of OS usage per month over several months?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250461#M74803</link>
      <description>&lt;P&gt;This does appear to get the job done. Upvoted/accepted.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 19:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-display-a-timechart-showing-the/m-p/250461#M74803</guid>
      <dc:creator>michael_sleep</dc:creator>
      <dc:date>2016-12-09T19:41:45Z</dc:date>
    </item>
  </channel>
</rss>

