<?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: counting returning customers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796773#M281487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Jonathan suggested you can use Year as dimension in a pivot table like below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="T157703.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81983_T157703.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;here you can find number of orders by year and again you can go to the second dimension to find who all have ordered in a particular year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Mar 2015 09:53:44 GMT</pubDate>
    <dc:creator>sudeepkm</dc:creator>
    <dc:date>2015-03-26T09:53:44Z</dc:date>
    <item>
      <title>counting returning customers</title>
      <link>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796770#M281484</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;I have a list of customers and each customers orderDates. I'm trying to count the number of customers who have made orders the following years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of the 4 customers who have made orders in 2012, 2 of 4 have also ordered in 2013 and 1 of 4 have one in 2014.&lt;/P&gt;&lt;P&gt;How can this be made?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="299" style="border: 1px solid #000000; border-image: none; width: 159px; height: 245px;" width="158"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;CustomerID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;OrderDate&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12-12-2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01-01-2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;05-05-2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;07-07-2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;06-06-2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04-04-2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;04-04-2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;08-08-2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01-01-2012&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01-01-2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01-01-2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 09:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796770#M281484</guid>
      <dc:creator>nicolai_moller</dc:creator>
      <dc:date>2015-03-26T09:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: counting returning customers</title>
      <link>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796771#M281485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add a Year field to your table and present in a pivot table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 09:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796771#M281485</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2015-03-26T09:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: counting returning customers</title>
      <link>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796772#M281486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load *,Year(OrderDate) As Yr;&lt;/P&gt;&lt;P&gt;Load CustomerID,Date#(OrderDate,'MM-DD-YYYY') As OrderDate Inline [&lt;/P&gt;&lt;P&gt;CustomerID,OrderDate&lt;/P&gt;&lt;P&gt;1,12-12-2012&lt;/P&gt;&lt;P&gt;2,01-01-2012&lt;/P&gt;&lt;P&gt;2,05-05-2013&lt;/P&gt;&lt;P&gt;3,07-07-2014&lt;/P&gt;&lt;P&gt;4,06-06-2015&lt;/P&gt;&lt;P&gt;5,04-04-2012&lt;/P&gt;&lt;P&gt;5,04-04-2012&lt;/P&gt;&lt;P&gt;6,08-08-2013&lt;/P&gt;&lt;P&gt;7,01-01-2012&lt;/P&gt;&lt;P&gt;7,01-01-2013&lt;/P&gt;&lt;P&gt;7,01-01-2014 ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='Returing customers in 2013: ' &amp;amp;Count(DISTINCT {&amp;lt;CustomerID=P({&amp;lt;Yr={'&amp;lt;2013'}&amp;gt;})&amp;gt;*&amp;lt;CustomerID=P({&amp;lt;Yr={2013}&amp;gt;})&amp;gt;}CustomerID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='Returing customers in 2014: ' &amp;amp;Count(DISTINCT {&amp;lt;CustomerID=P({&amp;lt;Yr={'&amp;lt;2013'}&amp;gt;})&amp;gt;*&amp;lt;CustomerID=P({&amp;lt;Yr={2014}&amp;gt;})&amp;gt;}CustomerID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 09:48:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796772#M281486</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2015-03-26T09:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: counting returning customers</title>
      <link>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796773#M281487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Jonathan suggested you can use Year as dimension in a pivot table like below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="T157703.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81983_T157703.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;here you can find number of orders by year and again you can go to the second dimension to find who all have ordered in a particular year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 09:53:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796773#M281487</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2015-03-26T09:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: counting returning customers</title>
      <link>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796774#M281488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to do it in the script, you can add this resident load after you load the &lt;STRONG&gt;Orders&lt;/STRONG&gt; table (you may have named it differently).&lt;/P&gt;&lt;P&gt;It will create a linked table with for each customerID:&lt;/P&gt;&lt;P&gt;ReturnedTimeSpan: diff between first and last order year&lt;/P&gt;&lt;P&gt;ReturnedYears: number of distinct years the customer has ordered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure you can do more according to what you really want with this as starting point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Returning:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; CustomerID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Max(Year(OrderDate)) - Min(Year(OrderDate)) As ReturnedTimeSpan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Count(DISTINCT Year(OrderDate)) As ReturnedYears&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; RESIDENT Orders GROUP BY CustomerID;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 11:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/counting-returning-customers/m-p/796774#M281488</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-03-26T11:45:13Z</dc:date>
    </item>
  </channel>
</rss>

