<?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 How to calculate the lost, new or existing customer based on their sales by year or month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-lost-new-or-existing-customer-based-on/m-p/193790#M54926</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can load your sales table as follow:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;FLAG_ACTIVE:&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt; MONTHNAME(SALES_DATE) AS PERIOD,&lt;BR /&gt; CUSTOMER,&lt;BR /&gt; IF(INMONTH(SALES_DATE,TODAY(),0),1,&lt;BR /&gt; IF(INMONTH(SALES_DATE,TODAY(),-1),2,0) AS FLAG&lt;BR /&gt;RESIDENT SALES&lt;BR /&gt;;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In your charts, the result of SUM(FLAG) means&lt;/P&gt;&lt;P&gt;0 -&amp;gt; your customer had a sale but dont in the last two months = long time lost client&lt;/P&gt;&lt;P&gt;2 -&amp;gt; your customer had a sale last month but not this mont = lost client&lt;/P&gt;&lt;P&gt;1 -&amp;gt; your customer had a sale this month but dont in the last month = new client or lost client reactivated&lt;/P&gt;&lt;P&gt;3 -&amp;gt; Your client is buying regularly the last two months = active client&lt;/P&gt;&lt;P&gt;You can use more months and improve the logic, but this is an idea!&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jun 2010 13:51:22 GMT</pubDate>
    <dc:creator>fernandotoledo</dc:creator>
    <dc:date>2010-06-18T13:51:22Z</dc:date>
    <item>
      <title>How to calculate the lost, new or existing customer based on their sales by year or month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-lost-new-or-existing-customer-based-on/m-p/193789#M54925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to create a bar chart or pivot table to find out the customers that have not purchased during the period selected by user to flag out as LOST CUSTOMER, NEW CUSTOMER OR EXISTING CUSTOMER. Can anyone help me out to solve this problem and advise the solution.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sajid Mahmood&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 13:01:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-the-lost-new-or-existing-customer-based-on/m-p/193789#M54925</guid>
      <dc:creator>Sajid_Mahmood</dc:creator>
      <dc:date>2010-06-18T13:01:49Z</dc:date>
    </item>
    <item>
      <title>How to calculate the lost, new or existing customer based on their sales by year or month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-the-lost-new-or-existing-customer-based-on/m-p/193790#M54926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can load your sales table as follow:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;FLAG_ACTIVE:&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt; MONTHNAME(SALES_DATE) AS PERIOD,&lt;BR /&gt; CUSTOMER,&lt;BR /&gt; IF(INMONTH(SALES_DATE,TODAY(),0),1,&lt;BR /&gt; IF(INMONTH(SALES_DATE,TODAY(),-1),2,0) AS FLAG&lt;BR /&gt;RESIDENT SALES&lt;BR /&gt;;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In your charts, the result of SUM(FLAG) means&lt;/P&gt;&lt;P&gt;0 -&amp;gt; your customer had a sale but dont in the last two months = long time lost client&lt;/P&gt;&lt;P&gt;2 -&amp;gt; your customer had a sale last month but not this mont = lost client&lt;/P&gt;&lt;P&gt;1 -&amp;gt; your customer had a sale this month but dont in the last month = new client or lost client reactivated&lt;/P&gt;&lt;P&gt;3 -&amp;gt; Your client is buying regularly the last two months = active client&lt;/P&gt;&lt;P&gt;You can use more months and improve the logic, but this is an idea!&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 13:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-the-lost-new-or-existing-customer-based-on/m-p/193790#M54926</guid>
      <dc:creator>fernandotoledo</dc:creator>
      <dc:date>2010-06-18T13:51:22Z</dc:date>
    </item>
  </channel>
</rss>

