<?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 show repeat purchase.. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256310#M516962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Gysbert...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;I just have a doubt, if i want to show same thing for next&amp;nbsp; 3 months...&lt;/P&gt;&lt;P&gt;For an e.g : &lt;/P&gt;&lt;P&gt;There's as Sale for May, Jun and Sep..&lt;/P&gt;&lt;P&gt;So for the Month of May and Jun should be count of 1..but not for Sep..as its next any of the next three months doesn't have sale.&lt;/P&gt;&lt;P&gt;It means the month itself should have sale and in any of the next three month should have sale..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly guide me...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kavita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Feb 2017 08:56:45 GMT</pubDate>
    <dc:creator>kavita25</dc:creator>
    <dc:date>2017-02-12T08:56:45Z</dc:date>
    <item>
      <title>How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256306#M516958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show those customers who was repeated in next month..&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with this issue..&lt;/P&gt;&lt;P&gt;Its really very very urgent....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kavita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2017 17:47:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256306#M516958</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-11T17:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256307#M516959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a new table in your script from the first one and then drop that first table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;_tempTable:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;load *,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt; Year(InvoiceDate)*12+ Month(InvoiceDate) as MonthCounter,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Month(InvoiceDate) as InvMonth,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Year(InvoiceDate) as InvYear;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; &lt;EM&gt;&amp;nbsp; ...some fields...&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DMS Outlet Code],&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;EM&gt;&amp;nbsp; ...some more fields...&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(InvoiceDate,'DD MMM YYYY'),'DD/MM/YYYY') as&amp;nbsp; InvoiceDate,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...rest of the fields...&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; [c249529.qvd]&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; (qvd)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Result:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; *,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; If(Previous(MonthCounter)=MonthCounter+1,1,0) as IsReturning&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;RESIDENT&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; _tempTable&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ORDER BY&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DMS Outlet Code],&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InvoiceDate desc&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;DROP TABLE _tempTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use this expression: Count({&amp;lt;IsReturning={1}&amp;gt;}DISTINCT [DMS Outlet Code])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2017 18:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256307#M516959</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-02-11T18:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256308#M516960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there is a factor missing in MonthCounter calculation to create unique and consecutive numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(InvoiceDate)&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; *12&lt;/STRONG&gt;+ Month(InvoiceDate) as MonthCounter,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2017 19:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256308#M516960</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-11T19:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256309#M516961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're completely right. Didn't copy it correctly from my workbook. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 07:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256309#M516961</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-02-12T07:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256310#M516962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Gysbert...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;I just have a doubt, if i want to show same thing for next&amp;nbsp; 3 months...&lt;/P&gt;&lt;P&gt;For an e.g : &lt;/P&gt;&lt;P&gt;There's as Sale for May, Jun and Sep..&lt;/P&gt;&lt;P&gt;So for the Month of May and Jun should be count of 1..but not for Sep..as its next any of the next three months doesn't have sale.&lt;/P&gt;&lt;P&gt;It means the month itself should have sale and in any of the next three month should have sale..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly guide me...&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kavita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 08:56:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256310#M516962</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T08:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256311#M516963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help me with this isuee...&lt;/P&gt;&lt;P&gt;Its really very very urgent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 12:31:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256311#M516963</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T12:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256312#M516964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It might be urgent for you, this does not imply that it's urgent for us, on a weekend ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe something like attached:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14869056835628687" jivemacro_uid="_14869056835628687"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Binary 'Test (49).qvw';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;NewMaster:&lt;/P&gt;
&lt;P&gt;LOAD *, &lt;/P&gt;
&lt;P&gt;&amp;nbsp; AutoNumberHash128(&amp;nbsp; [DMS Outlet Code], MonthCounter) as Key;&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; MonthName(MakeDate(InvYear, InvMonth)) as InvMonthName,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Year(InvoiceDate)*12+ Month(InvoiceDate) as MonthCounter&lt;/P&gt;
&lt;P&gt;Resident UCMaster;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE UCMaster;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TMP:&lt;/P&gt;
&lt;P&gt;LOAD DISTINCT &lt;/P&gt;
&lt;P&gt;&amp;nbsp; Key,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; MonthCounter,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [DMS Outlet Code]&lt;/P&gt;
&lt;P&gt;RESIDENT&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NewMaster;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; Key,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Previous(MonthCounter)=MonthCounter+1 and&amp;nbsp; [DMS Outlet Code] = Previous( [DMS Outlet Code]),Rangesum(Peek(ReturningIn),1),0) as ReturningIn&lt;/P&gt;
&lt;P&gt;RESIDENT TMP&lt;/P&gt;
&lt;P&gt;ORDER BY&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DMS Outlet Code],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthCounter desc&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DROP Table TMP;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt; exit script;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can filter the records to show only codes with at least N appearances in directly following months like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;ReturningIn ={"&amp;gt;=3"}&amp;gt;}DISTINCT [DMS Outlet Code])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 13:22:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256312#M516964</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-12T13:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256313#M516965</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;Its showing only for Aug..it should show sale for that particular Month...and in next 3 month sale..&lt;/P&gt;&lt;P&gt;3 month sale is like it can be any month..&lt;/P&gt;&lt;P&gt;For.e.g Aug, Oct Dec..&lt;/P&gt;&lt;P&gt;Aug is the month,next 3 month sale is Sep Oct Nov...in oct it has sale..so it should be consider..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there's no compulsion that it sholud have sale for all the next 3 months...there will be OR condition..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 13:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256313#M516965</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T13:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256314#M516966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You so much for ur reply...&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 13:42:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256314#M516966</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T13:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256315#M516967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, if you need an or logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; Key,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Previous(MonthCounter) = MonthCounter+1 and&amp;nbsp; [DMS Outlet Code] = Previous( [DMS Outlet Code]),1,0) as ReturningIn1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match( Previous(MonthCounter)- MonthCounter,1,2) and&amp;nbsp; [DMS Outlet Code] =&amp;nbsp; Previous([DMS Outlet Code]),1,0) as ReturningInAny2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match( Previous(MonthCounter)- MonthCounter,1,2,3) and&amp;nbsp; [DMS Outlet Code] = Previous([DMS Outlet Code]),1,0) as ReturningInAny3&lt;/P&gt;&lt;P&gt;RESIDENT TMP&lt;/P&gt;&lt;P&gt;ORDER BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DMS Outlet Code],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthCounter desc&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 16:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256315#M516967</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-12T16:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256316#M516968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You for ur precious time and response..&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 16:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256316#M516968</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T16:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256317#M516969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is another ( IMHO more flexible)&amp;nbsp; approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; Key,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If([DMS Outlet Code] = Previous( [DMS Outlet Code]),Previous(MonthCounter) - MonthCounter ) as ReturningAfter&lt;/P&gt;&lt;P&gt;RESIDENT TMP&lt;/P&gt;&lt;P&gt;ORDER BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DMS Outlet Code],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthCounter desc&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 16:51:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256317#M516969</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-12T16:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256318#M516970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay... i'll try this one also..&lt;/P&gt;&lt;P&gt;Can u please tell me..&lt;/P&gt;&lt;P&gt;How will I check the particular month has no sale but previous month has sale..&lt;/P&gt;&lt;P&gt;For e.g: Dec has no sale but Nov has sale..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And&lt;/P&gt;&lt;P&gt;Previous 2 month has sale but the previous 1 month and the particular month has no sale.&lt;/P&gt;&lt;P&gt;For e.g Oct has sale but (Dec and Nov) has no sale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only above logic is left to do..&lt;/P&gt;&lt;P&gt;Kindly guide me..&lt;/P&gt;&lt;P&gt;And thank you soo much...Really appreciate ur help..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kavita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 17:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256318#M516970</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T17:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256319#M516971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first one is correct...&lt;/P&gt;&lt;P&gt;Thanks Again..&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 17:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256319#M516971</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256320#M516972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first question can be answered just like the question that already has been answered before, you just need to change the sort order and add another field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second question could be answered using my second approach and filtering ReturningAfter &amp;gt;2 (or including maybe NULL).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 17:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256320#M516972</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-12T17:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256321#M516973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the first logic..&lt;/P&gt;&lt;P&gt;If(Previous(MonthCounter) = MonthCounter &lt;STRONG&gt;- 1&lt;/STRONG&gt; and&amp;nbsp; [DMS Outlet Code] = Previous( [DMS Outlet Code]),1,0) as ReturningIn1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT TMP&lt;/P&gt;&lt;P&gt;ORDER BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DMS Outlet Code],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthCounter asc&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it correct??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 17:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256321#M516973</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-12T17:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256322#M516974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, something like this. Just give it a try and test thoroughly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2017 18:14:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256322#M516974</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-12T18:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256323#M516975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with the issue...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;How will I check the Max month has no sale but previous month has sale..&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For e.g: In my data Max month is Dec has no sale but Nov has sale..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;And&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Previous to previous month has sale but&amp;nbsp; Max month and previous month has no sale.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For e.g Oct has sale but (Dec and Nov) has no sale.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 10:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256323#M516975</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-14T10:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256324#M516976</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;please help me to do this logic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 12:02:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256324#M516976</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2017-02-14T12:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to show repeat purchase..</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256325#M516977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am very late to this discussion and will have to check each and every response before I can answer anything. Also, you are getting help from two of the best here. I am going to let them continue helping out here &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 12:05:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-show-repeat-purchase/m-p/1256325#M516977</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-14T12:05:56Z</dc:date>
    </item>
  </channel>
</rss>

