<?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 display fixed datas set per month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200819#M503978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could consider not manually add last dates of the month ... There are functions to retrieve e.g. the lastday of the month ... MonthEnd() for the "Payment dates".&lt;/P&gt;&lt;P&gt;When loading the data you could add an extra field containing the MonthEnd() date on which you base your selection.&lt;/P&gt;&lt;P&gt;But if you are only interested in the month you could create a calendar for selecting the dates ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jan 2010 14:49:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-05T14:49:07Z</dc:date>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200818#M503977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I currently work on a table to view the evolution of a customer base over the months, however, I have a problem with an expression.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Usually I was working on orders, sales etc. ... and so I based my time axis on the "Payment Date".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To this array of clients I manually create a new independent date field containing the last day of each month:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;date_generique:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;date_g&lt;BR /&gt;'2009-05-31 '&lt;BR /&gt;'2009-06-30 '&lt;BR /&gt;'2009-07-31 '&lt;BR /&gt;'2009-08-31 '&lt;BR /&gt;'2009-09-30 '&lt;BR /&gt;'2009-10-31 '&lt;BR /&gt;'2009-11-30 '&lt;BR /&gt;'2009-12-31 '&lt;BR /&gt;'2010-01-31 '&lt;BR /&gt;'2010-02-28 '&lt;BR /&gt;'2010-03-31 '&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;I then create a (graphical) Table which I simply assigned the following dimension:&lt;BR /&gt;&lt;BR /&gt;= 'Base customers' &amp;amp; MonthName (date_g)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is my expression:&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; Total number of customers at the end of the month:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;= Sum (Aggr (Max (if (date_client &amp;lt;= date_g, 1,0)), id_membre, date_g))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; New Customers in that month:&lt;BR /&gt;&lt;BR /&gt;= Sum (Aggr (Max (if (date_client&amp;gt; = monthsstart (1 date_g) AND date_client &amp;lt;= monthsend (1 date_g), 1,0)), id_membre, date_g))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Date_client which corresponds to the date of customer acquisition.&lt;BR /&gt;&lt;BR /&gt;Here is an expression that I have a problem:&lt;BR /&gt;I would like to display the number of customers who made at least one purchase in the month! Here's what I started to write:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;= Sum (Aggr (Max (if (date_paid_ymd = date_g, 1,0)), id_membre, date_g, date_paid_ymd))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However the figures shown are false.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;&lt;BR /&gt;(Please tell me if there is a better way to organize my data to carry out this table)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 14:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200818#M503977</guid>
      <dc:creator />
      <dc:date>2010-01-05T14:36:45Z</dc:date>
    </item>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200819#M503978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could consider not manually add last dates of the month ... There are functions to retrieve e.g. the lastday of the month ... MonthEnd() for the "Payment dates".&lt;/P&gt;&lt;P&gt;When loading the data you could add an extra field containing the MonthEnd() date on which you base your selection.&lt;/P&gt;&lt;P&gt;But if you are only interested in the month you could create a calendar for selecting the dates ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 14:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200819#M503978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T14:49:07Z</dc:date>
    </item>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200820#M503979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, you are right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be honest I already did it with executing this code on reload :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom:0cm;"&gt;&lt;B&gt;LET&lt;/B&gt; date_g_begin = Num('2007-12-01');&lt;/P&gt;&lt;P style="margin-bottom:0cm;"&gt;&lt;B&gt;LET&lt;/B&gt; date_g_end = Num(Today(0));&lt;/P&gt;&lt;P style="margin-bottom:0cm;"&gt;&lt;B&gt;for&lt;/B&gt; date=&lt;I&gt;&lt;B&gt;$(date_g_begin)&lt;/B&gt;&lt;/I&gt; &lt;B&gt;to&lt;/B&gt; &lt;I&gt;&lt;B&gt;$(date_g_end)&lt;/B&gt;&lt;/I&gt;&lt;/P&gt;&lt;P style="font-style: italic; margin-bottom: 0cm"&gt;date_generique:&lt;/P&gt;&lt;P style="margin-bottom:0cm;"&gt;&lt;B&gt;LOAD&lt;/B&gt; &lt;B&gt;DISTINCT&lt;/B&gt; monthsend(1,date(&lt;I&gt;&lt;B&gt;$(date)&lt;/B&gt;&lt;/I&gt;)) &lt;B&gt;as&lt;/B&gt; date_g &lt;B&gt;autogenerate&lt;/B&gt;(1);&lt;/P&gt;&lt;P style="font-weight: bold; margin-bottom: 0cm"&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And using a calendar could be a good solution too ... but my real problem is in the expression .. I'm working on it and I got it now :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Sum( Aggr ( Max ( if(date_paid_ymd &amp;gt;= monthsstart(1,date_g) AND date_paid_ymd &amp;lt;= date_g,1,0) ) , id_membre, date_g, date_paid_ymd) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got more interesting results (I have to verify if they are correct), but my table is very slow to refresh .... (and I only try to show one month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 15:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200820#M503979</guid>
      <dc:creator />
      <dc:date>2010-01-05T15:09:48Z</dc:date>
    </item>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200821#M503980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What way is your calendar connected to the table you use?? If you have a connection with the dates it is not hard to create selections ... an no difficult expressions are necessary ...&lt;/P&gt;&lt;P&gt;If you select a month all items will be selected within that month ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say you have a calendar like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LET vMinDate = NUM(DATE('1-12-2007'));&lt;BR /&gt;LET vMaxDate = NUM(TODAY());&lt;BR /&gt;&lt;BR /&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt; $(vMinDate)+ITERNO() AS NUM,&lt;BR /&gt; DATE($(vMinDate)+ITERNO()-1) AS TempDate&lt;BR /&gt;&lt;BR /&gt;AUTOGENERATE (1) WHILE&lt;BR /&gt; $(vMinDate)+ITERNO()-1 &amp;lt;= $(vMaxDate);&lt;BR /&gt;&lt;BR /&gt;Calendar:&lt;BR /&gt;LOAD&lt;BR /&gt; TempDate AS &lt;B&gt;"Payment Date"&lt;/B&gt;,&lt;BR /&gt; YEAR(TempDate) AS Year,&lt;BR /&gt; APPLYMAP('Quarter', NUM(MONTH(TempDate))) AS Quarter,&lt;BR /&gt; MONTH(TempDate) AS Month,&lt;BR /&gt; WEEK(TempDate) AS Week,&lt;BR /&gt; WEEKDAY(TempDate) AS WeekDay,&lt;BR /&gt; DAY(TempDate) AS Day,&lt;BR /&gt; DATE(MONTHSTART(TempDate), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt; MONTHEND(TempDate) as MonthEnd&lt;BR /&gt;&lt;BR /&gt;RESIDENT&lt;BR /&gt; TempCalendar&lt;BR /&gt;ORDER BY&lt;BR /&gt; TempDate;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In this case the right data is already selected when you selected e.g. a month according to the &lt;I&gt;Payment Date&lt;/I&gt; ... it makes the expression a lot simpler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 15:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200821#M503980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T15:25:09Z</dc:date>
    </item>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200822#M503981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, thanks for this code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean I have to replace &lt;B&gt;"Payment Date"&lt;/B&gt; by my payement date field used in my datas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because The problem is, that i want to use my "calendar date" tu compare with various dates, like "&lt;B&gt;date_client&lt;/B&gt;" for my two first expressions in order to count Total client, and new clients each month ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 15:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200822#M503981</guid>
      <dc:creator />
      <dc:date>2010-01-05T15:53:46Z</dc:date>
    </item>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200823#M503982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes the "Payment Date" mentioned in the calendar should be the same name as your field ... this way the calendar is connected to your table.&lt;/P&gt;&lt;P&gt;When you select a Month all payment dates in that month will be selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Snail wrote: "calendar date" tu compare with various dates, like "&lt;B&gt;date_client&lt;/B&gt;"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You mean the same Month selection should be compared to another date?? Could compare this in an expression ofcourse ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 16:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200823#M503982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-05T16:01:43Z</dc:date>
    </item>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200824#M503983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&lt;/P&gt;&lt;P&gt;I tried your solution, which is much better than mine, IF ( &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt; ) I can associate My number of customers and new customers in the same table !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension : MonthYear&lt;/P&gt;&lt;P&gt;First expression (number of customers who bought something in the month):&lt;/P&gt;&lt;P&gt;Count(DISTINCT id_membre)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I tried to count My number of Custumers per months :&lt;/P&gt;&lt;P&gt;= Count({1&amp;lt;[date_client]={"&amp;lt;=MonthEnd"}&amp;gt;} DISTINCT id_membre)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it don't works (I get 0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 18:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200824#M503983</guid>
      <dc:creator />
      <dc:date>2010-01-05T18:01:36Z</dc:date>
    </item>
    <item>
      <title>How to display fixed datas set per month</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200825#M503984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that the problem is that i need to "unlink/unselect" the MonthYear selection in my expression to count my customers ...&lt;/P&gt;&lt;P&gt;I tried something like that :&lt;/P&gt;&lt;P&gt;= Count({$&amp;lt;[date_client]={"&amp;lt;=MonthEnd"},MonthYear={""}&amp;gt;} DISTINCT id_membre)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To show number of customers at the end of each months ..... i'm pretty sure that : [date_client]={"&amp;lt;=MonthEnd"} is working !&lt;/P&gt;&lt;P&gt;But the problem is to unlink/unselect MonthYear, because it's the dimension of my table ...... i don't know if it's feasible.&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 10:02:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-display-fixed-datas-set-per-month/m-p/200825#M503984</guid>
      <dc:creator />
      <dc:date>2010-01-06T10:02:25Z</dc:date>
    </item>
  </channel>
</rss>

