<?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 &amp;quot;Recency-Monetary&amp;quot; clients' distribution in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/quot-Recency-Monetary-quot-clients-distribution/m-p/10929#M458637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'd like to realize a part of RFM analysis (Recency-Monetary matrix, as an example).&amp;nbsp; I've made a sample in QlikView (script is below) but I'm not sure that my way of implementation is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1.&amp;nbsp; Is my way of calculation make sense? If it's not - how to do it in a better way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2. As you can see, customers are segmented in a load script based on the full period's data. So we can use the "MR" as a dimension in charts and build a visualization (sales per group, count of client per group, etc.) which will work correct based on selection. But how to look at the clients' distribution (based on a scatter chart; screenshot is attached)? If we would select something results were wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; Groupping:&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; ClientID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if(&amp;nbsp; SalesType = 1 and DateType = 1 , 'One-off' , &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if( (SalesType = 2 or SalesType = 3) and DateType = 1 , 'Lost',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if( SalesType = 1 and (DateType = 2 or DateType = 3), 'Newbie',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if( SalesType = 3 and DateType = 3 , 'VIP' , 'Growth' )))) as MR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ; &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; ClientID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( sum(Sales) &amp;lt;=300, 1 ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( sum(Sales) &amp;gt; 300 and sum(Sales) &amp;lt;= 800 , 2 , 3 )) as SalesType, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( max(Date) &amp;lt;= $(vMaxDate)- 3, 1 ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( max(Date) &amp;gt; $(vMaxDate) - 3 and max(Date) &amp;lt;= $(vMaxDate)-1 , 2 , 3 )) as DateType&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident Data Group by ClientID;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jan 2018 10:03:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-01-29T10:03:45Z</dc:date>
    <item>
      <title>"Recency-Monetary" clients' distribution</title>
      <link>https://community.qlik.com/t5/QlikView/quot-Recency-Monetary-quot-clients-distribution/m-p/10929#M458637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'd like to realize a part of RFM analysis (Recency-Monetary matrix, as an example).&amp;nbsp; I've made a sample in QlikView (script is below) but I'm not sure that my way of implementation is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1.&amp;nbsp; Is my way of calculation make sense? If it's not - how to do it in a better way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2. As you can see, customers are segmented in a load script based on the full period's data. So we can use the "MR" as a dimension in charts and build a visualization (sales per group, count of client per group, etc.) which will work correct based on selection. But how to look at the clients' distribution (based on a scatter chart; screenshot is attached)? If we would select something results were wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; Groupping:&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; ClientID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if(&amp;nbsp; SalesType = 1 and DateType = 1 , 'One-off' , &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if( (SalesType = 2 or SalesType = 3) and DateType = 1 , 'Lost',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if( SalesType = 1 and (DateType = 2 or DateType = 3), 'Newbie',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if( SalesType = 3 and DateType = 3 , 'VIP' , 'Growth' )))) as MR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ; &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; ClientID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( sum(Sales) &amp;lt;=300, 1 ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( sum(Sales) &amp;gt; 300 and sum(Sales) &amp;lt;= 800 , 2 , 3 )) as SalesType, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( max(Date) &amp;lt;= $(vMaxDate)- 3, 1 ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if( max(Date) &amp;gt; $(vMaxDate) - 3 and max(Date) &amp;lt;= $(vMaxDate)-1 , 2 , 3 )) as DateType&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Resident Data Group by ClientID;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 10:03:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-Recency-Monetary-quot-clients-distribution/m-p/10929#M458637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-29T10:03:45Z</dc:date>
    </item>
  </channel>
</rss>

