<?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 I need a single value after dividing 2 results which we obtain as a result of stats dc. As of now, I see 3 values. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-need-a-single-value-after-dividing-2-results-which-we-obtain/m-p/255674#M76550</link>
    <description>&lt;P&gt;The query I use is-&lt;/P&gt;

&lt;P&gt;sourcetype=iis URL_root=abc "&lt;A href="https://www.abc.com%22%7Cstats"&gt;https://www.abc.com"|stats&lt;/A&gt; dc(SessionId) as TotalVisits, dc(userid) as TotalUsers|eval AvgVisit=TotalVisits/TotalUsers&lt;/P&gt;

&lt;P&gt;So the final result I see has 1 row but with 3 values-one each for TotalVisits, Totalusers and AvgVisit. But in the dashboard all I need is the AvgVisit value. This is to calculate the average visit per visitor value. Using the single Value panel in the dashboard displays the first value i.e TotalVisits. Please help!&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 10:57:38 GMT</pubDate>
    <dc:creator>prateedshetty</dc:creator>
    <dc:date>2017-01-27T10:57:38Z</dc:date>
    <item>
      <title>I need a single value after dividing 2 results which we obtain as a result of stats dc. As of now, I see 3 values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-a-single-value-after-dividing-2-results-which-we-obtain/m-p/255674#M76550</link>
      <description>&lt;P&gt;The query I use is-&lt;/P&gt;

&lt;P&gt;sourcetype=iis URL_root=abc "&lt;A href="https://www.abc.com%22%7Cstats"&gt;https://www.abc.com"|stats&lt;/A&gt; dc(SessionId) as TotalVisits, dc(userid) as TotalUsers|eval AvgVisit=TotalVisits/TotalUsers&lt;/P&gt;

&lt;P&gt;So the final result I see has 1 row but with 3 values-one each for TotalVisits, Totalusers and AvgVisit. But in the dashboard all I need is the AvgVisit value. This is to calculate the average visit per visitor value. Using the single Value panel in the dashboard displays the first value i.e TotalVisits. Please help!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 10:57:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-a-single-value-after-dividing-2-results-which-we-obtain/m-p/255674#M76550</guid>
      <dc:creator>prateedshetty</dc:creator>
      <dc:date>2017-01-27T10:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: I need a single value after dividing 2 results which we obtain as a result of stats dc. As of now, I see 3 values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-a-single-value-after-dividing-2-results-which-we-obtain/m-p/255675#M76551</link>
      <description>&lt;P&gt;You just need to add a table command at the end of your search to list the fields that you want to display (and in which order).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=iis URL_root=abc "https://www.abc.com"|stats dc(SessionId) as TotalVisits, dc(userid) as TotalUsers|eval AvgVisit=TotalVisits/TotalUsers | table AvgVisit
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jan 2017 15:59:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-a-single-value-after-dividing-2-results-which-we-obtain/m-p/255675#M76551</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-27T15:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: I need a single value after dividing 2 results which we obtain as a result of stats dc. As of now, I see 3 values.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-a-single-value-after-dividing-2-results-which-we-obtain/m-p/255676#M76552</link>
      <description>&lt;P&gt;Thanks! It worked as I wanted it to.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 13:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-a-single-value-after-dividing-2-results-which-we-obtain/m-p/255676#M76552</guid>
      <dc:creator>prateedshetty</dc:creator>
      <dc:date>2017-02-08T13:16:21Z</dc:date>
    </item>
  </channel>
</rss>

