<?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 get count of subsearch and main search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497979#M138722</link>
    <description>&lt;P&gt;Iam trying to get a inner join result which looks some thing like if there are 100 unique fields from subsearch, I want to confirm if each field is present in the main search and get the count if presents.  get count of subsearch and main search.&lt;/P&gt;</description>
    <pubDate>Sat, 16 May 2020 05:53:18 GMT</pubDate>
    <dc:creator>sree6494</dc:creator>
    <dc:date>2020-05-16T05:53:18Z</dc:date>
    <item>
      <title>get count of subsearch and main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497979#M138722</link>
      <description>&lt;P&gt;Iam trying to get a inner join result which looks some thing like if there are 100 unique fields from subsearch, I want to confirm if each field is present in the main search and get the count if presents.  get count of subsearch and main search.&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 05:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497979#M138722</guid>
      <dc:creator>sree6494</dc:creator>
      <dc:date>2020-05-16T05:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: get count of subsearch and main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497980#M138723</link>
      <description>&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 12:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497980#M138723</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-16T12:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: get count of subsearch and main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497981#M138724</link>
      <description>&lt;P&gt;to4kawa - Iam able to do the inner join but struggling with getting the count. Are you suggesting the alternatives of join statement for this purpose?&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 19:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497981#M138724</guid>
      <dc:creator>sree6494</dc:creator>
      <dc:date>2020-05-18T19:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: get count of subsearch and main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497982#M138725</link>
      <description>&lt;P&gt;index=A "SMSSent=[1]" earliest=-11m@m latest=-1m@m&lt;BR /&gt;
| join type=inner MessageID [ search index=A "DeliveryReceipt=[1]" earliest=-12m@m latest=-0m@m ]&lt;/P&gt;

&lt;P&gt;here Im getting the results from my main search and mapping it with sub search. I am wondering how the count can be calculated for main search results and count for the join results. &lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 20:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497982#M138725</guid>
      <dc:creator>sree6494</dc:creator>
      <dc:date>2020-05-18T20:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: get count of subsearch and main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497983#M138726</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=A "SMSSent=[1]" earliest=-11m@m latest=-1m@m
| eval flag="SMS"
| append [ search index=A "DeliveryReceipt=[1]" earliest=-12m@m latest=-0m@m 
| eval flag="DR"]
| stats count by flag
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;how about this?&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 09:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497983#M138726</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-19T09:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: get count of subsearch and main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497984#M138727</link>
      <description>&lt;P&gt;this is great, but the subsearch results aren't a subset of the main search results(based on the MessageID field), which is the challenge&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 13:29:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497984#M138727</guid>
      <dc:creator>sree6494</dc:creator>
      <dc:date>2020-05-19T13:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: get count of subsearch and main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497985#M138728</link>
      <description>&lt;P&gt;I have no idea what log you want to count.&lt;/P&gt;

&lt;P&gt;my answer result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;flag count
DR  xxx
SMS XXX
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;comparison:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A "SMSSent=[1]" earliest=-11m@m latest=-1m@m
| eval flag="SMS"
| append [ search index=A "DeliveryReceipt=[1]" earliest=-12m@m latest=-0m@m 
| eval flag="DR"]
| stats count(eval(flag="SMS"))) as SMS count(eval(flag="DR"))) as DR
| eval compare = DR -SMS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this result:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DR  SMS compare
XXX YYY ZZ
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2020 13:58:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-count-of-subsearch-and-main-search/m-p/497985#M138728</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-19T13:58:45Z</dc:date>
    </item>
  </channel>
</rss>

