<?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 Set Analysis - Greater then Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687390#M475860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem. I must determine the number of (following) orders from customers who have purchased a particular (selected) product in the first order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I have a feeling that my Set Analysis formula ignored the part with order_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14042028651954938" jivemacro_uid="_14042028651954938"&gt;
&lt;P&gt;Count({1&amp;lt;customer_id=P({&amp;lt;first_order={'Y'},product_id=P(product_id)&amp;gt;} customer_id),order_date={"&amp;gt;$(=Date({1&amp;lt;first_order={'Y'},product_id=P(product_id)&amp;gt;} order_date))"}&amp;gt;} DISTINCT order_id)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please look at you the formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2014 08:26:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-01T08:26:24Z</dc:date>
    <item>
      <title>Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687390#M475860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem. I must determine the number of (following) orders from customers who have purchased a particular (selected) product in the first order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I have a feeling that my Set Analysis formula ignored the part with order_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14042028651954938" jivemacro_uid="_14042028651954938"&gt;
&lt;P&gt;Count({1&amp;lt;customer_id=P({&amp;lt;first_order={'Y'},product_id=P(product_id)&amp;gt;} customer_id),order_date={"&amp;gt;$(=Date({1&amp;lt;first_order={'Y'},product_id=P(product_id)&amp;gt;} order_date))"}&amp;gt;} DISTINCT order_id)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please look at you the formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 08:26:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687390#M475860</guid>
      <dc:creator />
      <dc:date>2014-07-01T08:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687391#M475861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be a bit simpler like this?&lt;/P&gt;&lt;P&gt;Count({1&amp;lt;product_id=p(product_id), first_order={'Y'},order_date={"&amp;gt;$(=Only(order_date)"}&amp;gt;} DISTINCT order_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 08:33:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687391#M475861</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-07-01T08:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687392#M475862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;better if you provide sample apps or sample data file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 08:43:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687392#M475862</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-07-01T08:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687393#M475863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The mark "first_order" is associated with an order number. If I do so as you suggested, then only orders with "first_order = Y" is evaluated. Or I'm wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 08:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687393#M475863</guid>
      <dc:creator />
      <dc:date>2014-07-01T08:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687394#M475864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to create a sample Data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I can write the answer as SQL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select Count(distinct a.order_id)&lt;/P&gt;&lt;P&gt;from order_headers a&lt;/P&gt;&lt;P&gt;join (Select a.customer_id,a.order_id,a.order_date from order_headers a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; join order_positions b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.order_id = b.order_id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where b._product_id = '4711' and a.first_order = 'Y') b&lt;/P&gt;&lt;P&gt;on a.customer_id = b.customer_id&lt;/P&gt;&lt;P&gt;where a.order_date &amp;gt; b.order_date;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 08:54:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687394#M475864</guid>
      <dc:creator />
      <dc:date>2014-07-01T08:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687395#M475865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the command: order_date = {"&amp;gt; $ (= Only (order_date))"} retrieved only a single order date or individually for each row?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:12:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687395#M475865</guid>
      <dc:creator />
      <dc:date>2014-07-01T09:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687396#M475866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="untitled.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61489_untitled.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687396#M475866</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-07-01T09:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687397#M475867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding Product field in expression may not make sense if you have selection for product. The order date should be only one at a time, If the customer has made order few times than you have to use Min or Max function in the expression. Below expression may work in your environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I didn't test this script, there might be some typo error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;customer_id=P({1&amp;lt;first_order={'Y'}&amp;gt;} customer_id), order_date={"&amp;gt;$(=Max(P({1&amp;lt;first_order={'Y'}&amp;gt;} order_date)))"}&amp;gt;} DISTINCT order_id)&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687397#M475867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-01T09:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687398#M475868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added &lt;STRONG&gt;product=P(product_id)&lt;/STRONG&gt; because the setting&lt;STRONG&gt; {1&amp;lt;...&lt;/STRONG&gt; cancels the "product_id" selection again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687398#M475868</guid>
      <dc:creator />
      <dc:date>2014-07-01T09:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687399#M475869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, here is a sample file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 08:06:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687399#M475869</guid>
      <dc:creator />
      <dc:date>2014-07-02T08:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Greater then Date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687400#M475870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way to depict&amp;nbsp; " order_date&amp;gt; P () " in Set Analysi? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 06:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Greater-then-Date/m-p/687400#M475870</guid>
      <dc:creator />
      <dc:date>2014-07-03T06:34:03Z</dc:date>
    </item>
  </channel>
</rss>

