<?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 get a % of page hits off the total users who accessed a set of pages. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-get-a-of-page-hits-off-the-total-users-who-accessed-a/m-p/471115#M192230</link>
    <description>&lt;P&gt;Thanks! this worked.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2019 13:06:05 GMT</pubDate>
    <dc:creator>abhijitd</dc:creator>
    <dc:date>2019-09-04T13:06:05Z</dc:date>
    <item>
      <title>How do i get a % of page hits off the total users who accessed a set of pages.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-get-a-of-page-hits-off-the-total-users-who-accessed-a/m-p/471113#M192228</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=app sourcetype=accesslog uri="some uri" user!="-"  (context="display" OR context="pages") earliest=-7d | rex field=page ^"(?&amp;lt;spacekey_or_action&amp;gt;\S+)(\/|\?|spaceKey\=|draftId\=|pageId\=|key\=)|(?&amp;lt;pid_or_sk&amp;gt;[0-9|a-z|A-Z|\+\%\-\:\(\)\.]{1,})|\&amp;amp;(?&amp;lt;article&amp;gt;\S+)" max_match=0 | search spacekey_or_action="123" OR (spacekey_or_action="viewpage.action" AND pid_or_sk="123")
|  stats dc(user) as users by page 
|  sort -users
|  eventstats sum(users) as totalUsers
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the display as :&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Page1     100     150&lt;/LI&gt;
&lt;LI&gt;Page2      50       150&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Basically, my question is how do i get a % so Page 1 is 66% of total events and Page 2 is 33% of total events and so on &lt;/P&gt;

&lt;P&gt;The base rex and this followup rex searches all pages for the content group 123. &lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 01:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-get-a-of-page-hits-off-the-total-users-who-accessed-a/m-p/471113#M192228</guid>
      <dc:creator>abhijitd</dc:creator>
      <dc:date>2019-09-04T01:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get a % of page hits off the total users who accessed a set of pages.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-get-a-of-page-hits-off-the-total-users-who-accessed-a/m-p/471114#M192229</link>
      <description>&lt;P&gt;@abhijitd ,&lt;/P&gt;

&lt;P&gt;Just add this to your search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | eval perc=round((users/totalUsers)*100,2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 07:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-get-a-of-page-hits-off-the-total-users-who-accessed-a/m-p/471114#M192229</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-09-04T07:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get a % of page hits off the total users who accessed a set of pages.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-get-a-of-page-hits-off-the-total-users-who-accessed-a/m-p/471115#M192230</link>
      <description>&lt;P&gt;Thanks! this worked.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:06:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-get-a-of-page-hits-off-the-total-users-who-accessed-a/m-p/471115#M192230</guid>
      <dc:creator>abhijitd</dc:creator>
      <dc:date>2019-09-04T13:06:05Z</dc:date>
    </item>
  </channel>
</rss>

