<?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: wrong aggr behavior for last day in month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351867#M30169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above approach will work try above one &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 May 2017 09:44:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-16T09:44:34Z</dc:date>
    <item>
      <title>wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351864#M30166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with the aggr function: it doesn't sum the values from the last day of each month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the data set:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="319.666666" style="border: 1px solid rgb(0, 0, 0); width: 295.667px; height: 275.667px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;10/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;10/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;10/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;17/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;24/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;31/1/2017&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;31/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;7/2/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;21/2/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28/2/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expected output&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="319.666666" style="border: 1px solid #000000; width: 295.667px; height: 275.667px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;31/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28/2/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following solution takes the right dates but sum all the month values:&lt;/P&gt;&lt;P&gt;Dimension =aggr(Max(Date),YearMonth)&lt;/P&gt;&lt;P&gt;Measure = sum({$&amp;lt;Date= {"=aggr(Max(Date),YearMonth)"}&amp;gt;} [Planned value (K€)])&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="319.666666" style="border: 1px solid #000000; width: 295.667px; height: 275.667px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;31/1/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;60 (wrong)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;28/2/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;28 (wrong)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea to have only the sum of the last day? (without valuelist if possible)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicolas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 08:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351864#M30166</guid>
      <dc:creator />
      <dc:date>2017-05-16T08:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351865#M30167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;sum({&amp;lt;Date={"=Date=AGGR(DATE#(MonthEnd(Date),'DD/M/YYYY'),Date)"}&amp;gt;} Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351865#M30167</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-05-16T09:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351866#M30168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another Approach is to create a RowKEY() that identifies each row separately&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo() as RowKEY&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;RowKEY={"=Date=DATE#(MonthEnd(Date),'DD/M/YYYY')"}&amp;gt;} Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351866#M30168</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-05-16T09:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351867#M30169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above approach will work try above one &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351867#M30169</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-16T09:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351868#M30170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, the Date was generated artificially retrieving the file name during the LOAD process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I have to add the last day date after the first LOAD process, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, this is quite complex &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:51:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351868#M30170</guid>
      <dc:creator />
      <dc:date>2017-05-16T09:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351869#M30171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the sample you've posted closely represents your actual dataset then the methods and expressions i provided above will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or else please post a sample app with expected output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:53:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351869#M30171</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-05-16T09:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351870#M30172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to use advanced search (which groups by your field and expects a boolean answer to the question if the field value should be included or not):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Measure &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;= sum({$&amp;lt;Date= {"=Date = Floor(Monthend(Date))"}&amp;gt;} [Planned value (K€)])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Probably easier would be to use a master calendar and flag the monthend dates in your script (using the same logic).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Date = Floor(Monthend(Date)),1,0) as MonthendFlag,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Measure &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;= sum({$&amp;lt;MonthendFlag= {1} &amp;gt;} [Planned value (K€)])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 09:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351870#M30172</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-16T09:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351871#M30173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vineeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code. As the Date is generated progressively with several files including the date information, we cannot define the MonthEnd(Date):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each File in filelist (path_Pallet)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;week_counter = $(week_counter) +1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[DTC]:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; date(mid(filename(),26,10)) as [Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(date(mid(filename(),26,10),'YYYY/MM')) as YearMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(week_counter) as CW,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;FROM $(File)&lt;/P&gt;&lt;P&gt;(ooxml , embedded labels , table is OPX2); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 11:29:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351871#M30173</guid>
      <dc:creator />
      <dc:date>2017-05-16T11:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351872#M30174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, the MonthendFlag column has "0" in all the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have another solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: the &lt;SPAN style="font-size: 13.3333px;"&gt;MonthendFlag column has been created afterwards, complete code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;for each File in filelist (path_Pallet)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;week_counter = $(week_counter) +1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;T1:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; date(mid(filename(),26,10)) as [Date],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(date(mid(filename(),26,10),'YYYY/MM')) as YearMonth,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(week_counter) as CW,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM $(File)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(ooxml , embedded labels , table is OPX2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T2:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(date([Date]) = date(Monthend([Date])),[Date]) as MonthEndDate&lt;/P&gt;&lt;P&gt;resident T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table T1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 14:09:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351872#M30174</guid>
      <dc:creator />
      <dc:date>2017-05-16T14:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351873#M30175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because Monthend() returns a timestamp, corresponding to the last millisecond of the month.&lt;/P&gt;&lt;P&gt;Noticed that I've used a different expression using Floor()?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 15:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351873#M30175</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-16T15:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351874#M30176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, I've already tried your proposed solution, but more simple with just the Floor(Monthend()) functions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "if" didn't seem to work, even if I add the date() function to have the same formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;T2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;load&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowno() as rownb,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text([Date])&amp;nbsp; as [DateTest], // ex: 15/01/2017&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If([Date] = Floor(Monthend([Date])), [Date],'none') as MonthEndDate&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;resident T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Drop Table T1;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;Neverthelless, the Date is correctly retrieved from the table T1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know why the "if" didn't work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 09:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351874#M30176</guid>
      <dc:creator />
      <dc:date>2017-05-17T09:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351875#M30177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your dates maybe also timestamps , just formatted as dates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; If(&lt;STRONG&gt;floor&lt;/STRONG&gt;([Date]) = Floor(Monthend([Date])), &lt;STRONG&gt;Dayname&lt;/STRONG&gt;([Date]),'none') as MonthEndDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;See also&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2954"&gt;Why don’t my dates work?&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 09:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351875#M30177</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-17T09:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351876#M30178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunatelly, it doesn't work neither.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So temporary solution we've found for the moment is to list the last recorded date with an "if".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've forgotten to mention that the last recorded day of each month is not always the least date of the month (see example after in march).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;T2:&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;load&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;[Date] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;31/1/2017&lt;/SPAN&gt;' or [&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Date] = '28/2/2017' &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;or [&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Date] = '29/3/2017'&lt;/SPAN&gt;, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Date] ) as MonthendDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;resident T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Drop Table T1;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicolas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 12:30:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351876#M30178</guid>
      <dc:creator />
      <dc:date>2017-05-19T12:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: wrong aggr behavior for last day in month</title>
      <link>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351877#M30179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't work even for the month of January or February?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you double checked that your dates are not just text literals? (follow the link to Henric's blog post)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 12:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/wrong-aggr-behavior-for-last-day-in-month/m-p/1351877#M30179</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-19T12:37:14Z</dc:date>
    </item>
  </channel>
</rss>

