<?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 New customer analysis using set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222457#M75130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, here's a quick alternative that works while I try to figure out what's going wrong with the set analysis:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Added Count = -sum(aggr(only(MonthsBack)=0,AsOfYearMonth,Customer))&lt;BR /&gt;Added = concat(aggr(if(only(MonthsBack)=0,Customer),AsOfYearMonth,Customer),',')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Dec 2010 21:44:03 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-12-13T21:44:03Z</dc:date>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222456#M75129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on the classic new/lost customer problem using set analysis. I've found a few examples on the forum, but they don't seem to fit exactly what I'm after. I'm using the AsOf table approach with a "MonthsBack" field. Attached is a simple example of where I'm getting stuck.&lt;/P&gt;&lt;P&gt;I expected that the set&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;{ &amp;lt;MonthsBack={'0'}&amp;gt; - &amp;lt;MonthsBack={'&amp;gt;0&amp;lt;4'}&amp;gt;}&lt;/P&gt;&lt;P&gt;would give me Customers who ordered in the current month and did not order in the prior three months. It's not working. Any idea where I'm going wrong?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 21:07:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222456#M75129</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-12-13T21:07:55Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222457#M75130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, here's a quick alternative that works while I try to figure out what's going wrong with the set analysis:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Added Count = -sum(aggr(only(MonthsBack)=0,AsOfYearMonth,Customer))&lt;BR /&gt;Added = concat(aggr(if(only(MonthsBack)=0,Customer),AsOfYearMonth,Customer),',')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 21:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222457#M75130</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-13T21:44:03Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222458#M75131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a "gut feeling" that it doesn't work because the Set Analysis condition is being evaluated "globally", - e.g. once for the whole chart, and therefore cannot be sensitive to the individual "As of Month" values.&lt;/P&gt;&lt;P&gt;If you apply your Set Analysis condition "globally" (without any relation to AsOfMonthYear), you'll see that the only Customer and Date that remains in the set after subtracting one set from another, is Customer C1 with Order Date 5/15 - and that's I believe the reason you see an unexpected result in May.&lt;/P&gt;&lt;P&gt;On the other hand, I don't have a great solution for this problem - you probably have to go back to calculating flags in the load script, based on certain conditions, and using flags in combination with Set Analysis...&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 21:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222458#M75131</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-12-13T21:56:26Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222459#M75132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're exactly right, Oleg. I was just about to post that very explanation when I saw that you'd already posted it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 22:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222459#M75132</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-13T22:02:30Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222460#M75133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to both of you. I understand the problem better.The aggr() solution helps. I'll see if I can work it into the complete problem.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 00:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222460#M75133</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-12-14T00:23:48Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222461#M75134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggr() works for computing the Added, but how about Lost? Attached is an other example with everything but Lost. Any ideas?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 19:32:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222461#M75134</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-12-14T19:32:43Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222462#M75135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I really should have just posted this yesterday. Here's an example I have with added, retained and lost customers, though obviously it isn't for your specific sample data. Hopefully you'll be able to adapt it to your own data, but if not, I can take a closer look later.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 20:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222462#M75135</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-14T20:16:14Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222463#M75136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John. That's a big help. I've now got something of a useful lost count by testing only(MonthsBack)=3. Still have some odd results but moving forward.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 21:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222463#M75136</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-12-14T21:08:46Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222464#M75137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking a little more closely, I'd think you'd want this for lost customers, assuming by lost customers you mean "customers I had last month but do not have this month". It seems to produce the results I'd expect.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;concat(aggr(if(only({&amp;lt;MonthsBack={0,1}&amp;gt;} MonthsBack)=1,Customer),AsOfYearMonth,Customer),',')&lt;BR /&gt; count(aggr(if(only({&amp;lt;MonthsBack={0,1}&amp;gt;} MonthsBack)=1,Customer),AsOfYearMonth,Customer))&lt;/P&gt;&lt;P&gt;I switched to count() instead of -sum() because my first try with -sum() didn't work, count() just makes more sense, and it also more closely matches the concat(). Overall, it should be easier for maintenance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 21:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222464#M75137</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-14T21:22:59Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222465#M75138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;In this app, the definition given for Lost is "Sale over previous 3 months but no sales for the past 3 months current month included.".&lt;/P&gt;&lt;P&gt;Which means customers I had 3 months ago but had no sales in the current month, the -1 month and the -2 month. So the only() technique works excellent, testing only the oldest month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-sum(aggr(only(MonthsBack)=3, AsOfYearMonth,Customer))&lt;/P&gt;&lt;P&gt;Attached is my sample including the Lost. Thanks for the help.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 23:29:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222465#M75138</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-12-14T23:29:56Z</dc:date>
    </item>
    <item>
      <title>New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222466#M75139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This post is very singular, is refered to customers, is refered to set analysis, with partipation of 3 big referents.&lt;/P&gt;&lt;P&gt;Thanks Rob, John y Oleg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 00:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222466#M75139</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2010-12-15T00:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222467#M75140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes is very very singular and very useful&lt;/P&gt;&lt;P&gt;Thank's for sharing&lt;/P&gt;&lt;P&gt;Saludos&lt;/P&gt;&lt;P&gt;EC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 08:17:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222467#M75140</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2016-08-15T08:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222468#M75141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is a great post, quite surprised there aren't many more New Customer analysis threads. This works well but takes an unsurprisingly long amount of time and consumes a large amount of resources when trying to calculate from a dataset with circa 10 million records over 15 months, and I will be required to expand this data set. Is this the most efficient way of doing this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 15:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/222468#M75141</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-20T15:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: New customer analysis using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/1557205#M440975</link>
      <description>&lt;P&gt;How do I set/get the 'MonthsBack' and 'AsOfYearMonth' ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 13:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-customer-analysis-using-set-analysis/m-p/1557205#M440975</guid>
      <dc:creator>jaymeknapp</dc:creator>
      <dc:date>2019-03-15T13:30:47Z</dc:date>
    </item>
  </channel>
</rss>

