<?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 get a single output from 2 different &amp;quot;stats count&amp;quot; in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370921#M67366</link>
    <description>&lt;P&gt;Hi antoniofacchi,&lt;/P&gt;

&lt;P&gt;You can use &lt;STRONG&gt;join&lt;/STRONG&gt; command to get the same output .. refer below link&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Join"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Join&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2017 09:36:04 GMT</pubDate>
    <dc:creator>anjambha</dc:creator>
    <dc:date>2017-11-15T09:36:04Z</dc:date>
    <item>
      <title>how get a single output from 2 different "stats count"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370920#M67365</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;

&lt;P&gt;with the following search:&lt;BR /&gt;
&lt;EM&gt;index="app_dynatrace" sourcetype="pa" application="Saipemcom Prod" "dimensions.Apdex performance zone for User Actions" !=unknown&lt;BR /&gt;
| append [search index="app_dynatrace" sourcetype="visit" application="Saipemcom Prod"&lt;BR /&gt;
|  spath "dimensions.Visits - Geo Information" output=Country_visit]|  spath "dimensions.Apdex performance zone for User Actions" output=Apdex_val|spath "dimensions.Country of Visits" output=Country1 | rex field=Country1 "(?\S+(\s\w&lt;/EM&gt;)&lt;EM&gt;)(\s+-)?"&lt;BR /&gt;
|eval Country_useraction=trim(CountryS)|fields Country_useraction, Country_visit&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I'd like a single output like:&lt;/P&gt;

&lt;P&gt;Country     Visit         Useraction&lt;BR /&gt;
Italy            800           1000&lt;BR /&gt;
USA            100           123&lt;BR /&gt;
....               ....              .........&lt;/P&gt;

&lt;P&gt;Many thanks for the support.&lt;BR /&gt;
Regards&lt;BR /&gt;
Antonio&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:48:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370920#M67365</guid>
      <dc:creator>antoniofacchi</dc:creator>
      <dc:date>2020-09-29T16:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: how get a single output from 2 different "stats count"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370921#M67366</link>
      <description>&lt;P&gt;Hi antoniofacchi,&lt;/P&gt;

&lt;P&gt;You can use &lt;STRONG&gt;join&lt;/STRONG&gt; command to get the same output .. refer below link&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Join"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Join&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 09:36:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370921#M67366</guid>
      <dc:creator>anjambha</dc:creator>
      <dc:date>2017-11-15T09:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: how get a single output from 2 different "stats count"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370922#M67367</link>
      <description>&lt;P&gt;Hi antoniofacchi,&lt;BR /&gt;
I cannot replicate your search, but if you have the same output of both your searches, you can merge them, see this example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index1
| stats count AS Total1 BY host
| append [ search index=index2 | stats count AS Total2 BY host ]
| stats values(Total1) AS Total1 values(Total2) AS Total2 BY host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It's important to have in both main and sub searches the same BY field and assign a name to each output (or outputs) of the stats command.&lt;BR /&gt;
In this way you have on the same row values of Total1 and Total2 for each host.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 11:27:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370922#M67367</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-15T11:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: how get a single output from 2 different "stats count"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370923#M67368</link>
      <description>&lt;P&gt;HI anjambha,&lt;/P&gt;

&lt;P&gt;thank you for the suggetion,it  works very well.&lt;/P&gt;

&lt;P&gt;regards&lt;BR /&gt;
Antonio&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 07:02:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370923#M67368</guid>
      <dc:creator>antoniofacchi</dc:creator>
      <dc:date>2017-11-16T07:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: how get a single output from 2 different "stats count"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370924#M67369</link>
      <description>&lt;P&gt;Hi Giuseppe,&lt;/P&gt;

&lt;P&gt;thank you for the suggestion,it  works very well.&lt;/P&gt;

&lt;P&gt;regards&lt;BR /&gt;
Antonio&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 07:02:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370924#M67369</guid>
      <dc:creator>antoniofacchi</dc:creator>
      <dc:date>2017-11-16T07:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: how get a single output from 2 different "stats count"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370925#M67370</link>
      <description>&lt;P&gt;Hi Antonio,&lt;BR /&gt;
if you're satisfied by this answer accept or upvote it.&lt;BR /&gt;
Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 09:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-get-a-single-output-from-2-different-quot-stats-count-quot/m-p/370925#M67370</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-11-16T09:07:44Z</dc:date>
    </item>
  </channel>
</rss>

