<?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: Customer Retention in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872579#M305000</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no, this is not at all what I was trying to say... In your original question, you mentioned that the expression returns "wrong" results in a chart by Region, unless a single Region is selected. This tells me that your expression needs to be "sensitive" to the dimension value (Region in this case). Set Analysis cannot be sensitive to the dimension values, and therefore it can't be used for such calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As much as I dislike using IF() functions, it may be necessary in your particular case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your data example, I'd recommend creating a combo key that combines Customer and Region and using that field in your Set Analysis condition, instead of the Customer. That should work much better for your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2015 20:59:34 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2015-05-04T20:59:34Z</dc:date>
    <item>
      <title>Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872574#M304995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to find the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set A - customers who purchased products same period last year&lt;/P&gt;&lt;P&gt;Set B - customers who purchased products same period this year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Set A) * (Set B) ==&amp;gt; Intersection/common i.e. retained customers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A snapshot/report date is common between the two sets along with other dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can have cases, where the customer is Lost in one region but gained in another Region but globally a retained customer for the company as they never left the company. But on a deeper dive, I can see that distinction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is a simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT(DISTINCT {&amp;lt;CustomerID = P({&amp;lt;BoughtLastPeriod = {1}&amp;gt;} CustomerID ) * P({&amp;lt;BoughtThisPeriod = {1}&amp;gt;} CustomerID) &amp;gt;} CustomerID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem I am having is when I have a dimension other than time (for eg. Region) the numbers are not correct when there are no filters applied in the Region field. When there are filters like Europe, the number gets reduced for the same dimension value. The filtered value is the right number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BoughtLastPeriod and BoughtThisPeriod never change but the Retained Customer could changes for the filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any way to understand what is missing in my expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 17:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872574#M304995</guid>
      <dc:creator />
      <dc:date>2015-05-04T17:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872575#M304996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Keep in mind that your Set Analysis condition cannot be sensitive to the dimension values (e.g. Regions) because Set Analysis is only calculated once per chart, not once per line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, your Set Analysis will always select all Customers that satisfy the condition, disregarding of the Regions. Then, in a chart by Region, Customers that are associated with the Regions, get aggregated and counted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need your condition to be sensitive to your dimension values, then Set Analysis may not be your solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Come and learn Set Analysis and AGGR with me at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for QlikView&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 18:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872575#M304996</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-05-04T18:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872576#M304997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So are you saying that this is a problem that needs to be resolved in the load script whereby I compute JOINs for all possible dimension combinations and then test for &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BoughtLastPeriod = 1 and BoughtThisPeriod = 1 AS RetainedCustomer (i.e. [Set A] * [Set B])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then using a master variable that selects the right RetainedCustomer column based on fields selected?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sounds very inefficient and goes into saying that such a metric cannot be solved as a Generic expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 19:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872576#M304997</guid>
      <dc:creator />
      <dc:date>2015-05-04T19:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872577#M304998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Amir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share your data model ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;they are several way to get the intersection to work, though each one of them could work better depending of the data model &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT(DISTINCT {&amp;lt;CurrentPeriod = {1},PreviousPeriod = {1}&amp;gt;} User) &lt;/P&gt;&lt;P&gt;COUNT(DISTINCT {&amp;lt;User = P({&amp;lt;CurrentPeriod = {1}&amp;gt;} User ) &amp;gt;*&amp;lt; User =&amp;nbsp; P({&amp;lt;PreviousPeriod = {1}&amp;gt;} User) &amp;gt; } User)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 20:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872577#M304998</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-04T20:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872578#M304999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The sample data and sample chart are attached in excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to do 1&amp;amp;1 = 1 type output and then capture the Customers with 1 and count them as my retained customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, I can obtain, New Customers, Lost Customers and so on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 20:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872578#M304999</guid>
      <dc:creator />
      <dc:date>2015-05-04T20:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872579#M305000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no, this is not at all what I was trying to say... In your original question, you mentioned that the expression returns "wrong" results in a chart by Region, unless a single Region is selected. This tells me that your expression needs to be "sensitive" to the dimension value (Region in this case). Set Analysis cannot be sensitive to the dimension values, and therefore it can't be used for such calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As much as I dislike using IF() functions, it may be necessary in your particular case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your data example, I'd recommend creating a combo key that combines Customer and Region and using that field in your Set Analysis condition, instead of the Customer. That should work much better for your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 20:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872579#M305000</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-05-04T20:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872580#M305001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I now understand. Yes, that is the conclusion I am arriving at too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am surprised that this problem couldn't be resolved easily but has to change dynamically based on each scenario because in my case, same customer can be in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. multiple countries&lt;/P&gt;&lt;P&gt;2. multiple sub-regions&lt;/P&gt;&lt;P&gt;3. multiple products&lt;/P&gt;&lt;P&gt;4. multiple reps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it adds to the complexity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT(DISTINCT AGGR(IF( NUM#((Current) &amp;amp; (Base)) = 11, ([CustomerID])), [CustomerID], [Sub-Region]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly, one for Region, Product etc. and depending on the X-axis, use the appropriate expression. That is extremely slow but I guess it is what it is. QlikView has met its match.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 21:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872580#M305001</guid>
      <dc:creator />
      <dc:date>2015-05-04T21:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872581#M305002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this formula may not work if you eventually have multiple values of Current and Base by Customer and Sub-Region. How about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(max(Current) * max(Base),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt; [CustomerID], [Sub-Region]))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 21:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872581#M305002</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-05-04T21:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Customer Retention</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872582#M305003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried simple expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=floor((sum(Base)+sum(Current))/2), It will show you only retained customer, but not&lt;/P&gt;&lt;P&gt;"APAC ex Japan" ... If you want to show the Result with Comments&lt;/P&gt;&lt;P&gt;Then you can do in this way&lt;/P&gt;&lt;P&gt;create a variable vConcat = ' if(isnull(Base),'-',Base)&amp;amp;if(isnull(Current),'-',Current) '&lt;/P&gt;&lt;P&gt;in Expression pick(Match($(vConcat),'11','10','01','-1','1-'),'R','N','L','NULL','NoBusin')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 20:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-Retention/m-p/872582#M305003</guid>
      <dc:creator />
      <dc:date>2015-05-05T20:38:18Z</dc:date>
    </item>
  </channel>
</rss>

