<?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: Re: Re: Need expression for end of month calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710460#M255950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cleaned up your data load with this syntax:&amp;nbsp; (where Temp is the name of the INLINE table load)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Count,date(date#(Date,'DD/MM/YYYY')) as Date,day(date#(Date,'DD/MM/YYYY')) as Day, month(date#(Date,'DD/MM/YYYY')) as Month, Year(date#(Date,'DD/MM/YYYY')) as Year&lt;/P&gt;&lt;P&gt;Resident Temp&lt;/P&gt;&lt;P&gt;where date(date#(Date,'DD/MM/YYYY')) &amp;lt;&amp;gt; '-';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i created a variable vMaxDate with this formula:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=date(max(Date),'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the chart expression to bring back only dates earlier than the max date in the user's selection is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum(&amp;nbsp; {$&amp;lt;Year=,Day=,Month=, Date= {"&amp;lt;=$(=date(vMaxDate))"}&amp;gt;}&amp;nbsp;&amp;nbsp; Count)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2014 19:48:59 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2014-09-16T19:48:59Z</dc:date>
    <item>
      <title>Need expression for end of month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710455#M255945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Can any body help expression for below:&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;ID, Date.&lt;/P&gt;&lt;P&gt;If I choose Month July, I have to get total no of records where Date &amp;lt;= 31 July’ 2014.&lt;/P&gt;&lt;P&gt;If I choose Year 2013 and (no month chosen), I have get total no of records where Date &amp;lt;= 31 Dec 2013.&lt;/P&gt;&lt;P&gt;If I choose Quarter (Q1), I have to get total no of records where Date &amp;lt;= 31 March.&lt;/P&gt;&lt;P&gt;If I choose Q2, I have to get total no of records where Date &amp;lt;= 31 June.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lakshmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 16:28:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710455#M255945</guid>
      <dc:creator />
      <dc:date>2014-09-16T16:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need expression for end of month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710456#M255946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any one help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 17:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710456#M255946</guid>
      <dc:creator />
      <dc:date>2014-09-16T17:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need expression for end of month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710457#M255947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have a Date field it could be best to use that in your SET ANALYSIS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your chart , use an expression like this where 'Date' is a date field in your data model and vMaxDate is a variable with the formula:&amp;nbsp;&amp;nbsp; =max(Date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; sum(&amp;nbsp; {$&amp;lt;Year=,Quarter=,Month=, Date= {"&amp;lt;=$(=date(vMaxDate))"}&amp;gt;}&amp;nbsp;&amp;nbsp; Sales) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will find out the maximum date in user's selection and give every data point that is &amp;lt;= that same date.&amp;nbsp; Year= and Quarter= and Month= ensures all the preceding dates are included.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 17:44:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710457#M255947</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-16T17:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Need expression for end of month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710458#M255948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, the above is not working for me i want like this.&lt;/P&gt;&lt;P&gt;If I selected 2013 July month i want to count max date of July 2013 to oldest record.&lt;/P&gt;&lt;P&gt;EX : in 2013 for July month 23 date is highest so i want to count from 23/July/2013 to 31/12/2012 till this count. (below example i have data till 2012 if i have 2011, 2010 .... so on i want to count all.&lt;/P&gt;&lt;P&gt;one more thing is if i chose only month so it should take 2014 and selected month and max date to do count.&lt;/P&gt;&lt;P&gt;If I choose Month July, I have to get total no of records where Date &amp;lt;= 31 July’ 2014.&lt;/P&gt;&lt;P&gt;If I choose Year 2013 and (no month chosen), I have get total no of records where Date &amp;lt;= 31 Dec 2013.&lt;/P&gt;&lt;P&gt;If I choose Quarter (Q1), I have to get total no of records where Date &amp;lt;= 31 March.&lt;/P&gt;&lt;P&gt;If I choose Q2, I have to get total no of records where Date &amp;lt;= 31 June.&lt;/P&gt;&lt;P&gt;Thank you very much for your help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Lakshmi&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="66894" alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/66894_pastedImage_0.png" style="width: 620px; height: 223px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 18:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710458#M255948</guid>
      <dc:creator />
      <dc:date>2014-09-16T18:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Need expression for end of month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710459#M255949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help please?????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 19:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710459#M255949</guid>
      <dc:creator />
      <dc:date>2014-09-16T19:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Need expression for end of month calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710460#M255950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cleaned up your data load with this syntax:&amp;nbsp; (where Temp is the name of the INLINE table load)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Count,date(date#(Date,'DD/MM/YYYY')) as Date,day(date#(Date,'DD/MM/YYYY')) as Day, month(date#(Date,'DD/MM/YYYY')) as Month, Year(date#(Date,'DD/MM/YYYY')) as Year&lt;/P&gt;&lt;P&gt;Resident Temp&lt;/P&gt;&lt;P&gt;where date(date#(Date,'DD/MM/YYYY')) &amp;lt;&amp;gt; '-';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i created a variable vMaxDate with this formula:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=date(max(Date),'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the chart expression to bring back only dates earlier than the max date in the user's selection is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum(&amp;nbsp; {$&amp;lt;Year=,Day=,Month=, Date= {"&amp;lt;=$(=date(vMaxDate))"}&amp;gt;}&amp;nbsp;&amp;nbsp; Count)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 19:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-expression-for-end-of-month-calculation/m-p/710460#M255950</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-09-16T19:48:59Z</dc:date>
    </item>
  </channel>
</rss>

