<?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 to create a funnel using a subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304375#M91524</link>
    <description>&lt;P&gt;@elliotproebstel If your problem is resolved, please accept an answer to help future readers.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2018 12:34:53 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2018-04-03T12:34:53Z</dc:date>
    <item>
      <title>How to create a funnel using a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304371#M91520</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I am trying to create a funnel that first count the number visits to page one and out of those how many went to page2? So if the first result produces 50, I would like to know out of that 50 how many visited the second page?  &lt;/P&gt;

&lt;P&gt;index="main" sourcetype=abc   event_name=spa | rename page.url as url  | search url="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-issue" OR url = "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support"  | stats  dc(session.id) as "customer_support_page_uniqie_visitspage1"&lt;/P&gt;

&lt;P&gt;index="main" sourcetype=abc  event_name=spa  | rename page.url as url  | search url="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-options2" OR url = "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_options"  | stats  dc(session.id) as "customer_support_page_uniqie_visitspage2"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:47:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304371#M91520</guid>
      <dc:creator>Valisha2005</dc:creator>
      <dc:date>2020-09-29T18:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a funnel using a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304372#M91521</link>
      <description>&lt;P&gt;The more efficient way to get these numbers out of Splunk isn't to create a funneled effect using subsearches (although that is possible, and tempting!) but rather to gather all events that would be used in either count and then use stats to calculate the numbers you seek. I'd do it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" sourcetype=abc event_name=spa page.url="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-issue" OR page.url = "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support" OR page.url="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-options2" OR page.url = "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_options"| eval visited_1=if('page.url'="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-issue" OR 'page.url'="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support", 1, NULL), visited_2=if('page.url'="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-options2" OR 'page.url'="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_options", 1, NULL) 
| stats max(visited_1) AS visited_1, max(visited_2) AS visited_2 BY session.id 
| eval visited_both=if(isnotnull(visited_1) AND isnotnull(visited_2), 1, 0) 
| stats sum(visited_1) AS total_visited_first_page sum(visited_both) AS total_visited_both_pages 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Mar 2018 19:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304372#M91521</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-27T19:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a funnel using a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304373#M91522</link>
      <description>&lt;P&gt;You can combine the two searches with &lt;CODE&gt;stats&lt;/CODE&gt; like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" sourcetype=abc event_name=spa | rename page.url as url | search (url="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-issue" OR url = "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support" OR url="https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-options2" OR url = "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_options") | stats count(eval(match(url, "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-issue") OR match(url, "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support"))) as page1 count(eval(match(url, "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_support%23select-options2") OR match(url = "https%3A%2F%2Fwww.pizzaspa.com%2Fcustomer_options"))) as page2 by session.id 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Mar 2018 19:39:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304373#M91522</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-03-27T19:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a funnel using a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304374#M91523</link>
      <description>&lt;P&gt;Thanks. I knew there had to be a way to combine those, but I couldn't seem to muster it. &lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 16:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304374#M91523</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-28T16:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a funnel using a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304375#M91524</link>
      <description>&lt;P&gt;@elliotproebstel If your problem is resolved, please accept an answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 12:34:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304375#M91524</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-04-03T12:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a funnel using a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304376#M91525</link>
      <description>&lt;P&gt;Thanks, but I'm guessing you were trying to tag @Valisha2005 on this, since it wasn't my question. So @Valisha2005 - if either of our answers solved your problem, please accept one to help others. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 02:06:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-funnel-using-a-subsearch/m-p/304376#M91525</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-04-04T02:06:50Z</dc:date>
    </item>
  </channel>
</rss>

