<?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: New Vs Repeat Customers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708572#M724181</link>
    <description>&lt;P&gt;Hi Saran,&lt;/P&gt;&lt;P&gt;Thanks a lot for pointing that out. I have corrected it. It will be 1&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jun 2020 13:43:21 GMT</pubDate>
    <dc:creator>atulkrsingh</dc:creator>
    <dc:date>2020-06-05T13:43:21Z</dc:date>
    <item>
      <title>New Vs Repeat Customers</title>
      <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708535#M724177</link>
      <description>&lt;P&gt;I'm new to Qlik and I'm trying to analyse new vs repeat customers.&lt;/P&gt;&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="atulkrsingh_0-1591357249896.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35024i08F7E54921FD4802/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atulkrsingh_0-1591357249896.png" alt="atulkrsingh_0-1591357249896.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The logic is that,&lt;/P&gt;&lt;P&gt;I need to capture the customer as a &lt;STRONG&gt;new customer&lt;/STRONG&gt; only when the &lt;STRONG&gt;first incidence of purchase occur&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and, I need to capture &lt;STRONG&gt;repeat customers only once in a year, irrespective of how many times they have purchased&lt;/STRONG&gt; in that particular year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708535#M724177</guid>
      <dc:creator>atulkrsingh</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: New Vs Repeat Customers</title>
      <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708538#M724178</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/118657"&gt;@atulkrsingh&lt;/a&gt;&amp;nbsp; can you share the expected output from this sample ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 12:09:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708538#M724178</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-05T12:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: New Vs Repeat Customers</title>
      <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708542#M724179</link>
      <description>&lt;P&gt;Hi Taoufiq,&lt;/P&gt;&lt;P&gt;Thanks for responding.&lt;/P&gt;&lt;P&gt;The expected output is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="atulkrsingh_0-1591364516973.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35031iD73191E157DD1FE0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atulkrsingh_0-1591364516973.png" alt="atulkrsingh_0-1591364516973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where,&lt;/P&gt;&lt;P&gt;in 2016, Customer ID = 1 and 2 are new customer whereas Customer ID 2 is a repeat customer&lt;/P&gt;&lt;P&gt;in 2017, Customer ID = 3 and 4 are new customer whereas Customer ID 1 is a repeat customer&lt;/P&gt;&lt;P&gt;and in 2018,&amp;nbsp;Customer ID = 2 is a repeat customer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 13:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708542#M724179</guid>
      <dc:creator>atulkrsingh</dc:creator>
      <dc:date>2020-06-05T13:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: New Vs Repeat Customers</title>
      <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708567#M724180</link>
      <description>&lt;P&gt;So, for 2018 the 'Repeat Customer' is not 1? How did you get 2 here?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 13:33:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708567#M724180</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-06-05T13:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: New Vs Repeat Customers</title>
      <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708572#M724181</link>
      <description>&lt;P&gt;Hi Saran,&lt;/P&gt;&lt;P&gt;Thanks a lot for pointing that out. I have corrected it. It will be 1&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 13:43:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708572#M724181</guid>
      <dc:creator>atulkrsingh</dc:creator>
      <dc:date>2020-06-05T13:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: New Vs Repeat Customers</title>
      <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708578#M724182</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/118657"&gt;@atulkrsingh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;one solution :&lt;/P&gt;&lt;P&gt;on laod Script :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Data:

load *,Year(Date#([Purchase Date],'DD-MMM-YY')) as Year inline [
Customer ID,Purchase Date
1,01-Jun-16
2,01-Aug-16
2,01-Nov-16
1,01-Feb-17
3,01-Apr-17
4,01-Aug-17
2,01-Mar-18
2,01-Dec-18
];

output:
noconcatenate

load *,if(Previous([Customer ID])=[Customer ID],'R','N') as Status;
load * resident Data order by [Customer ID],Year;

drop table Data;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then create Table :&lt;/P&gt;&lt;P&gt;dimension -&amp;gt; Year&lt;/P&gt;&lt;P&gt;Measure 1 (New Customer) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=count({&amp;lt;Status={'N'}&amp;gt;} distinct  [Customer ID])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 2 (Repeat Customer)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=count({&amp;lt;Status={'R'}&amp;gt;} distinct [Customer ID])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 709px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35033i0AB453FACA9436B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attached qvw file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 14:13:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708578#M724182</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-05T14:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: New Vs Repeat Customers</title>
      <link>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708582#M724183</link>
      <description>&lt;P&gt;Thanks a lot, Taoufiq!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 14:25:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Vs-Repeat-Customers/m-p/1708582#M724183</guid>
      <dc:creator>atulkrsingh</dc:creator>
      <dc:date>2020-06-05T14:25:24Z</dc:date>
    </item>
  </channel>
</rss>

