<?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 write one search to find a percentage using fields from two reports with different statistics in the same summary index? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169919#M48591</link>
    <description>&lt;P&gt;It is NOT valid to do &lt;CODE&gt;sum&lt;/CODE&gt; on a &lt;CODE&gt;dc&lt;/CODE&gt; value.   It is not ethical to help somebody produce a result that I know (or have every reason to believe) is invalid.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2015 16:15:12 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-08-13T16:15:12Z</dc:date>
    <item>
      <title>How write one search to find a percentage using fields from two reports with different statistics in the same summary index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169913#M48585</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I have a summarized index that contains two different reports, and these reports have statistical data with different parameters.&lt;/P&gt;

&lt;P&gt;One report (&lt;CODE&gt;report=MobilePJTotalClientesUnicos23hs&lt;/CODE&gt;) summarizes unique clients &lt;CODE&gt;clientes_unicos&lt;/CODE&gt;, and the other report (&lt;CODE&gt;report=ClientesImpactadosPorTransacaoMobilePJ_23h&lt;/CODE&gt;) summarizes impacted clients &lt;CODE&gt;ClientesImpactados&lt;/CODE&gt; by program &lt;CODE&gt;programa&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;So I want to do a search to calculate one percentage of impacted clients by program that is as simple as &lt;CODE&gt;eval percentual=ClientesImpactados/clientes_unicos&lt;/CODE&gt;, by program, but I can't figure out how to do that because one report statistic is by program and the other is not.&lt;/P&gt;

&lt;P&gt;I'm posting one example of the search I thought would do the job, but the result I get is the image below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sum_internet report=ClientesImpactadosPorTransacaoMobilePJ_23h OR report=MobilePJTotalClientesUnicos23hs | eval percentual=ClientesImpactados/clientes_unicos | table programa percentual
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="result_exemple"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/553i90DA5C3A2F65E83A/image-size/large?v=v2&amp;amp;px=999" role="button" title="result_exemple" alt="result_exemple" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;So sorry about my English, I hope someone can help me with that.&lt;/P&gt;

&lt;P&gt;Rgs.,&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 20:46:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169913#M48585</guid>
      <dc:creator>vitorvmiguel</dc:creator>
      <dc:date>2015-08-12T20:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: How write one search to find a percentage using fields from two reports with different statistics in the same summary index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169914#M48586</link>
      <description>&lt;P&gt;Although I could show you how to do it, I won't do so because the result will be incorrect.  Here is why.  In one data set you have a sum indicating the number of unique users for that timespan.  In the other data set, you have a sum of the number of unique users that were impacted by some problem with a program.  Because you have done  something like &lt;CODE&gt;dc(usesr) by App&lt;/CODE&gt;, and you have lost the &lt;CODE&gt;user&lt;/CODE&gt; details, you have no way of knowing whether user &lt;CODE&gt;X&lt;/CODE&gt; has been counted in more than one &lt;CODE&gt;App&lt;/CODE&gt; so it is NOT VALID to add those counts together to obtain "Total number of impacted users across all Apps" and if we cannot obtain this value, then we cannot generate your desired value.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 21:35:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169914#M48586</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-12T21:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: How write one search to find a percentage using fields from two reports with different statistics in the same summary index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169915#M48587</link>
      <description>&lt;P&gt;I understand what you said, and it may seem weird but makes sense, i'll explain why. One report calculates the number of clients with problems in one particular program, and the other the total amount of clients, so if i want to calculate the percentage of clients with problems in one program, relative to the total of clients it makes sense.&lt;BR /&gt;
So the problem is that the report with the total number of clients has only one result, its one constant that i wish to use to calculate the percentage, and the other report is clients over programs.&lt;/P&gt;

&lt;P&gt;So now makes sense?&lt;/P&gt;

&lt;P&gt;Thanks. &lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 12:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169915#M48587</guid>
      <dc:creator>vitorvmiguel</dc:creator>
      <dc:date>2015-08-13T12:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: How write one search to find a percentage using fields from two reports with different statistics in the same summary index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169916#M48588</link>
      <description>&lt;P&gt;It only makes sense if this is true:&lt;/P&gt;

&lt;P&gt;No user in the "error" file may ever be counted against more than 1 program.&lt;/P&gt;

&lt;P&gt;Is this statement true or false?  Obviously, if there is only 1 program in the dataset, then this must be true, but your picture clearly shows 4 programs.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 13:15:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169916#M48588</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-13T13:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: How write one search to find a percentage using fields from two reports with different statistics in the same summary index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169917#M48589</link>
      <description>&lt;P&gt;It's not about make sense or not, and how to do that, what i'm trying to do makes sense to me and to everyone that works with me, so that's not the point.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 13:36:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169917#M48589</guid>
      <dc:creator>vitorvmiguel</dc:creator>
      <dc:date>2015-08-13T13:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: How write one search to find a percentage using fields from two reports with different statistics in the same summary index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169918#M48590</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=sum_internet report=ClientesImpactadosPorTransacaoMobilePJ_23h OR report=MobilePJTotalClientesUnicos23hs | table programa ClientesImpactados, clientes_unicos | eventstats values(clientes_unicos) as clientes_unicos | where programa=*| eval percentual=ClientesImpactados/clientes_unicos | table programa percentual
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2015 15:25:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169918#M48590</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-13T15:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: How write one search to find a percentage using fields from two reports with different statistics in the same summary index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169919#M48591</link>
      <description>&lt;P&gt;It is NOT valid to do &lt;CODE&gt;sum&lt;/CODE&gt; on a &lt;CODE&gt;dc&lt;/CODE&gt; value.   It is not ethical to help somebody produce a result that I know (or have every reason to believe) is invalid.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 16:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-write-one-search-to-find-a-percentage-using-fields-from-two/m-p/169919#M48591</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-13T16:15:12Z</dc:date>
    </item>
  </channel>
</rss>

