<?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: New Customers by Invoice Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/New-Customers-by-Invoice-Date/m-p/1636829#M733165</link>
    <description>&lt;P&gt;Hi, this can be easier with a little preparation in script.&lt;/P&gt;&lt;P&gt;- From invoice date group the values by year and month, this can be done using monthstart:&lt;/P&gt;&lt;P&gt;Date(MonthStart([invoice date])) as YearMonth&lt;/P&gt;&lt;P&gt;- Create a table with first month of each customer and a flag for first sale:&lt;/P&gt;&lt;P&gt;FirstSaleTable:&lt;/P&gt;&lt;P&gt;LOAD [customer code], Date(Min(YearMonth)) as YearMonth, 1 as FirstMonthSale Resident &lt;EM&gt;OriginalDataTableName&lt;/EM&gt; Group by [customer code];&lt;/P&gt;&lt;P&gt;- Join this table with the original table&lt;/P&gt;&lt;P&gt;Left Join (&lt;EM&gt;OriginalDataTableName&lt;/EM&gt;) LOAD * Resident&amp;nbsp;FirstSaleTable;&lt;/P&gt;&lt;P&gt;- Delete FirstSaleTable:&lt;/P&gt;&lt;P&gt;DROP Table&amp;nbsp;FirstSaleTable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can use set analysis to load first month sales:&lt;/P&gt;&lt;P&gt;- Sum({&amp;lt;FirstMonthSale={1}&amp;gt;}&amp;nbsp;&lt;SPAN&gt;amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Sum({&amp;lt;FirstMonthSale={1}&amp;gt;}&amp;nbsp;profit)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2019 15:38:29 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2019-10-17T15:38:29Z</dc:date>
    <item>
      <title>New Customers by Invoice Date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Customers-by-Invoice-Date/m-p/1636672#M733164</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a data model like customer category, customer code, invoice date, amount, profit.&lt;/P&gt;&lt;P&gt;Want to create a pivot table with the new customers in every month with Sales and Profit.&lt;/P&gt;&lt;P&gt;That is if a customer is not present in the entire database and first invoice date in 2018 Jan, its a new customer in 2018 jan and need the sales and profit of such customer. Similar for the Other Months.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Customers-by-Invoice-Date/m-p/1636672#M733164</guid>
      <dc:creator>renjithk</dc:creator>
      <dc:date>2024-11-16T02:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: New Customers by Invoice Date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Customers-by-Invoice-Date/m-p/1636829#M733165</link>
      <description>&lt;P&gt;Hi, this can be easier with a little preparation in script.&lt;/P&gt;&lt;P&gt;- From invoice date group the values by year and month, this can be done using monthstart:&lt;/P&gt;&lt;P&gt;Date(MonthStart([invoice date])) as YearMonth&lt;/P&gt;&lt;P&gt;- Create a table with first month of each customer and a flag for first sale:&lt;/P&gt;&lt;P&gt;FirstSaleTable:&lt;/P&gt;&lt;P&gt;LOAD [customer code], Date(Min(YearMonth)) as YearMonth, 1 as FirstMonthSale Resident &lt;EM&gt;OriginalDataTableName&lt;/EM&gt; Group by [customer code];&lt;/P&gt;&lt;P&gt;- Join this table with the original table&lt;/P&gt;&lt;P&gt;Left Join (&lt;EM&gt;OriginalDataTableName&lt;/EM&gt;) LOAD * Resident&amp;nbsp;FirstSaleTable;&lt;/P&gt;&lt;P&gt;- Delete FirstSaleTable:&lt;/P&gt;&lt;P&gt;DROP Table&amp;nbsp;FirstSaleTable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can use set analysis to load first month sales:&lt;/P&gt;&lt;P&gt;- Sum({&amp;lt;FirstMonthSale={1}&amp;gt;}&amp;nbsp;&lt;SPAN&gt;amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Sum({&amp;lt;FirstMonthSale={1}&amp;gt;}&amp;nbsp;profit)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 15:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Customers-by-Invoice-Date/m-p/1636829#M733165</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2019-10-17T15:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: New Customers by Invoice Date</title>
      <link>https://community.qlik.com/t5/QlikView/New-Customers-by-Invoice-Date/m-p/1639170#M733166</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Renjith, did Ruben's post help you with things?&amp;nbsp; If so, do not forget to come back and use the Accept as Solution button on his post to give him credit for the help and let others know his suggestions worked.&amp;nbsp; If you are still working upon things, leave us an update, so we can try to get you further information.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;BR /&gt;Brett&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 18:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/New-Customers-by-Invoice-Date/m-p/1639170#M733166</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-10-23T18:46:03Z</dc:date>
    </item>
  </channel>
</rss>

