<?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: Divide the results of a query based on a field in the log in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553446#M157142</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234265"&gt;@SG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;got it!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=nextgen sourcetype=lighthouse_json sourcetype=lighthouse_json datasource=webpagetest step="Homepage"
| eventstats dc(documentcompletetime) as documentcompletetime
| stats count(url) as count values(documentcompletetime) as documentcompletetime by hostname
| eval division=count/documentcompletetime
| table hostname count documentcompletetime division&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 28 May 2021 06:21:24 GMT</pubDate>
    <dc:creator>aasabatini</dc:creator>
    <dc:date>2021-05-28T06:21:24Z</dc:date>
    <item>
      <title>Divide the results of a query based on a field in the log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553312#M157087</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I wanted to divide each hostname by using the count of "documentcompletetime" field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=nextgen sourcetype=lighthouse_json sourcetype=lighthouse_json datasource=webpagetest step="Homepage"
| chart count(url) by hostname&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output of the query is as below...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_0-1622115247907.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14337i761EE647F9875073/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_0-1622115247907.png" alt="SG_0-1622115247907.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;count(url) column I wanted to divide with the count of "documentcompletetime" field. This field is available in the events, screenshot for the same&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SG_1-1622115362565.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14338i3D9240AB29A8F712/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SG_1-1622115362565.png" alt="SG_1-1622115362565.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I wanted to divide each and every value of&amp;nbsp;count(url) column with&amp;nbsp;"documentcompletetime" count which is 48 in this example. documentcompletetime value is not a static value. The value changes based on the test timings. Can you guys please help?&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 11:40:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553312#M157087</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2021-05-27T11:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Divide the results of a query based on a field in the log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553314#M157088</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234265"&gt;@SG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you show the values of the documentcompletetime field?&lt;/P&gt;&lt;P&gt;also did you try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=nextgen sourcetype=lighthouse_json sourcetype=lighthouse_json datasource=webpagetest step="Homepage"
| chart count(url) by hostname documentcompletetime&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 May 2021 12:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553314#M157088</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-05-27T12:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Divide the results of a query based on a field in the log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553319#M157090</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222210"&gt;@aasabatini&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the query provided by you, i am just getting the count of url by host name&lt;/P&gt;&lt;TABLE width="233"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="194"&gt;hostname&lt;/TD&gt;&lt;TD width="39"&gt;NULL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;cdn.appdynamics.com&lt;/TD&gt;&lt;TD&gt;47&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;digitalcontent.api.tesco.com&lt;/TD&gt;&lt;TD&gt;658&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;o505202.ingest.sentry.io&lt;/TD&gt;&lt;TD&gt;61&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;pdx-col.eum-appdynamics.com&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;smetrics.tesco.com&lt;/TD&gt;&lt;TD&gt;47&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;A href="http://www.bing.com" target="_blank"&gt;www.bing.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;705&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;A href="http://www.googletagmanager.com" target="_blank"&gt;www.googletagmanager.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;49&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;www.***.com&lt;/TD&gt;&lt;TD&gt;686&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also wanted to divide each and every value in the null column with the count of "documentcompletetime" .&lt;/P&gt;&lt;P&gt;For example&amp;nbsp;&lt;/P&gt;&lt;TABLE width="447"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="194"&gt;hostname&lt;/TD&gt;&lt;TD width="39"&gt;NULL&lt;/TD&gt;&lt;TD width="150"&gt;documentcompletetime&lt;/TD&gt;&lt;TD width="64"&gt;count(url)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;cdn.appdynamics.com&lt;/TD&gt;&lt;TD&gt;47&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;0.979167&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;digitalcontent.api.tesco.com&lt;/TD&gt;&lt;TD&gt;658&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;13.70833&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;o505202.ingest.sentry.io&lt;/TD&gt;&lt;TD&gt;61&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;1.270833&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;pdx-col.eum-appdynamics.com&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;0.020833&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;smetrics.tesco.com&lt;/TD&gt;&lt;TD&gt;47&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;0.979167&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;A href="http://www.bing.com" target="_blank"&gt;www.bing.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;705&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;14.6875&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;A href="http://www.googletagmanager.com" target="_blank"&gt;www.googletagmanager.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;49&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;1.020833&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;www.**.com&lt;/TD&gt;&lt;TD&gt;686&lt;/TD&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;14.29167&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 27 May 2021 12:22:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553319#M157090</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2021-05-27T12:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Divide the results of a query based on a field in the log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553446#M157142</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234265"&gt;@SG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;got it!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=nextgen sourcetype=lighthouse_json sourcetype=lighthouse_json datasource=webpagetest step="Homepage"
| eventstats dc(documentcompletetime) as documentcompletetime
| stats count(url) as count values(documentcompletetime) as documentcompletetime by hostname
| eval division=count/documentcompletetime
| table hostname count documentcompletetime division&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 28 May 2021 06:21:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553446#M157142</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-05-28T06:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Divide the results of a query based on a field in the log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553471#M157146</link>
      <description>&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222210"&gt;@aasabatini&lt;/a&gt;&amp;nbsp; for the response, this is what i was looking for&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 09:39:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Divide-the-results-of-a-query-based-on-a-field-in-the-log/m-p/553471#M157146</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2021-05-28T09:39:03Z</dc:date>
    </item>
  </channel>
</rss>

