<?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 count at given month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679049#M51645</link>
    <description>&lt;P&gt;Thanks Sunny! Exactly what I was looking for. Great stuff &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2020 13:45:23 GMT</pubDate>
    <dc:creator>miklodepiklo</dc:creator>
    <dc:date>2020-02-25T13:45:23Z</dc:date>
    <item>
      <title>Customer count at given month</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679005#M51640</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I'm having difficulty creating a script that returns the amount of customers at a given month (first day of the month as reference would be fine).&lt;/P&gt;&lt;P&gt;Suppose the customer table would look something like:&lt;/P&gt;&lt;P&gt;Customers:&lt;BR /&gt;load * inline [&lt;BR /&gt;Name, Startdate, Enddate&lt;BR /&gt;Mike, 1-1-2019,&lt;BR /&gt;Johan, 1-10-2009, 1-1-2018&lt;BR /&gt;Marc, 1-12-2015, 1-1-2020&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Example: for customer Marc the result should be somthing like:&lt;BR /&gt;2019-12: active&lt;BR /&gt;2020-01: active&lt;BR /&gt;2020-02: inactive (or null(), no record)&lt;/P&gt;&lt;P&gt;What's the best way to do this? I was able to create it with refence dates (daily), but I now want to create it with reference months, since in reality there are over 300.000 customers. As a result the date script is creating too many rows in the calendar table.&lt;/P&gt;&lt;P&gt;Any help appreciated!&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679005#M51640</guid>
      <dc:creator>miklodepiklo</dc:creator>
      <dc:date>2024-11-16T19:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Customer count at given month</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679023#M51641</link>
      <description>&lt;P&gt;What happens if the Month End is somewhere in the middle of the month? For example, if Marc's Enddate was 2020-02-15... would he have a record in 2020-02 or not?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 12:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679023#M51641</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-25T12:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Customer count at given month</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679024#M51642</link>
      <description>&lt;P&gt;Marc would then be counted as an active customer. So we’d give him a two weeks free ride&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 12:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679024#M51642</guid>
      <dc:creator>miklodepiklo</dc:creator>
      <dc:date>2020-02-25T12:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Customer count at given month</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679033#M51643</link>
      <description>&lt;P&gt;Try this script&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Customers:
LOAD Name,
	 Date(MonthStart(Startdate, IterNo()-1), 'YYYY-MM') as MonthYear
While MonthStart(Startdate, IterNo()-1) &amp;lt;= Enddate;
LOAD Name,
	 Date(Date#(Startdate, 'D-M-YYYY')) as Startdate,
	 Date(If(Len(Trim(Enddate)) = 0, Today(), Date#(Enddate, 'D-M-YYYY'))) as Enddate;
LOAD * INLINE [
    Name, Startdate, Enddate
    Mike, 1-1-2019
    Johan, 1-10-2009, 1-1-2018
    Marc, 1-12-2015, 1-1-2020
];&lt;/LI-CODE&gt;&lt;P&gt;Marc would not have an entry for 2012-02 in the above example&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 13:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679033#M51643</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-25T13:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Customer count at given month</title>
      <link>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679049#M51645</link>
      <description>&lt;P&gt;Thanks Sunny! Exactly what I was looking for. Great stuff &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 13:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Customer-count-at-given-month/m-p/1679049#M51645</guid>
      <dc:creator>miklodepiklo</dc:creator>
      <dc:date>2020-02-25T13:45:23Z</dc:date>
    </item>
  </channel>
</rss>

