<?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 Quarterwise Addition of New Customers logic in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Quarterwise-Addition-of-New-Customers-logic/m-p/1734766#M56130</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a requirement of finding New Customers added Quarter Wise.&lt;/P&gt;&lt;P&gt;I have data from 2019 till present. FYear is considered from Apr-till March.&lt;/P&gt;&lt;P&gt;Suppose, if i select Current Financial Year as 2020/2021, then i need to check if the customer_ids&amp;nbsp; from Apr 2019-till present August 2020, i.e.,the Quarters Q1,Q2,Q3 and Q4 of 2019 and the present Quarter of 2020 i.e,Q1 and Q2, is there any transaction done by the customer_ids. If there is no transaction done in all this Quarters, like if it is equal to 0 , then that customer_id will be considered as "New Customer". If Transaction is made in any of the Quarter and customer_id already exists, then it must be considered as "Existing Customer".&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to create a flag in the script with below logic,&lt;/P&gt;&lt;P&gt;Transaction_table:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;customer_id,&lt;/P&gt;&lt;P&gt;amount,&lt;/P&gt;&lt;P&gt;date&lt;/P&gt;&lt;P&gt;from trans_table;&lt;/P&gt;&lt;P&gt;temp:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;if(customer_id=previous(customer_id),'Existing Customer','New Customer') as Flag&lt;/P&gt;&lt;P&gt;resident&amp;nbsp;Transaction_table order by customer_id,date;&lt;/P&gt;&lt;P&gt;drop table&amp;nbsp;Transaction_table ;&lt;/P&gt;&lt;P&gt;But how can i show this in front End in the chart Quarter Wise.&lt;/P&gt;&lt;P&gt;Please Suggest.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 21:08:46 GMT</pubDate>
    <dc:creator>sunainapawar</dc:creator>
    <dc:date>2021-12-20T21:08:46Z</dc:date>
    <item>
      <title>Quarterwise Addition of New Customers logic</title>
      <link>https://community.qlik.com/t5/App-Development/Quarterwise-Addition-of-New-Customers-logic/m-p/1734766#M56130</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a requirement of finding New Customers added Quarter Wise.&lt;/P&gt;&lt;P&gt;I have data from 2019 till present. FYear is considered from Apr-till March.&lt;/P&gt;&lt;P&gt;Suppose, if i select Current Financial Year as 2020/2021, then i need to check if the customer_ids&amp;nbsp; from Apr 2019-till present August 2020, i.e.,the Quarters Q1,Q2,Q3 and Q4 of 2019 and the present Quarter of 2020 i.e,Q1 and Q2, is there any transaction done by the customer_ids. If there is no transaction done in all this Quarters, like if it is equal to 0 , then that customer_id will be considered as "New Customer". If Transaction is made in any of the Quarter and customer_id already exists, then it must be considered as "Existing Customer".&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to create a flag in the script with below logic,&lt;/P&gt;&lt;P&gt;Transaction_table:&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&lt;/P&gt;&lt;P&gt;customer_id,&lt;/P&gt;&lt;P&gt;amount,&lt;/P&gt;&lt;P&gt;date&lt;/P&gt;&lt;P&gt;from trans_table;&lt;/P&gt;&lt;P&gt;temp:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;if(customer_id=previous(customer_id),'Existing Customer','New Customer') as Flag&lt;/P&gt;&lt;P&gt;resident&amp;nbsp;Transaction_table order by customer_id,date;&lt;/P&gt;&lt;P&gt;drop table&amp;nbsp;Transaction_table ;&lt;/P&gt;&lt;P&gt;But how can i show this in front End in the chart Quarter Wise.&lt;/P&gt;&lt;P&gt;Please Suggest.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Quarterwise-Addition-of-New-Customers-logic/m-p/1734766#M56130</guid>
      <dc:creator>sunainapawar</dc:creator>
      <dc:date>2021-12-20T21:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Quarterwise Addition of New Customers logic</title>
      <link>https://community.qlik.com/t5/App-Development/Quarterwise-Addition-of-New-Customers-logic/m-p/1735096#M56159</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;This is basically finding the duplicates in Customer_id. I tried below, but when we select New Customer, it is also including the customer_id those are existing. In my case, the New Customer must not include the Existing Customer_ids.&lt;/P&gt;&lt;P&gt;In below example, id 2 is repeated. So 2 must be existing customer, but when new customer flag is selected, this id 2 must be excluded. But this is included in New Customers. I have attached the screenshot for reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;id, date, phone&lt;/P&gt;&lt;P&gt;1, 1/1/2017, a&lt;/P&gt;&lt;P&gt;2, 2/1/2017, d&lt;/P&gt;&lt;P&gt;3, 4/1/2017, a&lt;/P&gt;&lt;P&gt;4, 5/1/2017, a&lt;/P&gt;&lt;P&gt;2, 1/1/2017, d&lt;BR /&gt;&lt;BR /&gt;6,12/1/2017, e&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;FinalTable:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;If(id = Previous(id), 'Existing customer', 'New Customer') as Flag&lt;/P&gt;&lt;P&gt;Resident Table&lt;/P&gt;&lt;P&gt;Order By id, date;&lt;/P&gt;&lt;P&gt;DROP Table Table;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 06:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Quarterwise-Addition-of-New-Customers-logic/m-p/1735096#M56159</guid>
      <dc:creator>sunainapawar</dc:creator>
      <dc:date>2020-08-12T06:20:28Z</dc:date>
    </item>
  </channel>
</rss>

