<?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: Calculation Of current and Previous Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918203#M987656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Try like this &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;sum({&amp;lt;[PeriodDate]={"&amp;gt;=$(=max([PeriodDate])-1)"}&amp;gt;}[Amount] &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2015 13:42:49 GMT</pubDate>
    <dc:creator>sunilkumarqv</dc:creator>
    <dc:date>2015-07-29T13:42:49Z</dc:date>
    <item>
      <title>Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918201#M987654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find attachement my sample data :&lt;/P&gt;&lt;P&gt;i need to calculate the sum of amount of max periodDate (of current Date)&lt;/P&gt;&lt;P&gt;and compare it with the Previous month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SumAmountMaxPeriodDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SumAmountPerviousMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will b clear when the sample data that i have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[PeriodDate]={$(=max([PeriodDate]))}&amp;gt;}[Amount] it give me a Sum of CurrentMonth (as max periodDate) and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the Previous Month i tried this expression&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[PeriodDate]={$(=num(monthend(AddMonths(max([PeriodDate]),-1))))}&amp;gt;}[Amount])&amp;nbsp;&amp;nbsp; it give me zero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 14:12:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918201#M987654</guid>
      <dc:creator>mario-sarkis</dc:creator>
      <dc:date>2015-07-28T14:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918202#M987655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MonthEnd will return the last second of a month: i.e. something like 01-01-2015 23:59:59. Your PeriodDate values won't have that time fraction. If you want the last day of the previous month try &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(=num(MonthStart(max([PeriodDate]))-1) )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 13:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918202#M987655</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-07-29T13:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918203#M987656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Try like this &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;sum({&amp;lt;[PeriodDate]={"&amp;gt;=$(=max([PeriodDate])-1)"}&amp;gt;}[Amount] &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 13:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918203#M987656</guid>
      <dc:creator>sunilkumarqv</dc:creator>
      <dc:date>2015-07-29T13:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918204#M987657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;hi Gysbert should i add AdMonths() before the periodeDate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 14:37:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918204#M987657</guid>
      <dc:creator>mario-sarkis</dc:creator>
      <dc:date>2015-07-29T14:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918205#M987658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;you can use floor to get rid of the fractions from the month end function, and when using monthend you can define the offset &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;sum({&amp;lt;[PeriodDate]={$(=num(floor(monthend((max([PeriodDate]),-1))))}&amp;gt;}[Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 14:43:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918205#M987658</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-07-29T14:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918206#M987659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramon i tried this Expression and it give me Zero &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; anything wrong in the syntax ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; sum({&amp;lt;[PeriodDate]={$(=num(floor(monthend(max([PeriodDate]))-1)))}&amp;gt;}[Amount])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 14:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918206#M987659</guid>
      <dc:creator>mario-sarkis</dc:creator>
      <dc:date>2015-07-29T14:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918207#M987660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil Kumar this is giving me the Sum of Amount of the Current month not the Previous one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help to find the sum of Amount of the Previous Month ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 15:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918207#M987660</guid>
      <dc:creator>mario-sarkis</dc:creator>
      <dc:date>2015-07-29T15:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918208#M987661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this expression is givin me Zero &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 15:07:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918208#M987661</guid>
      <dc:creator>mario-sarkis</dc:creator>
      <dc:date>2015-07-29T15:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation Of current and Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918209#M987662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are missing the coma for the monthend function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[PeriodDate]={$(=num(floor(monthend(max([PeriodDate]),-1))))}&amp;gt;}[Amount])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 15:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Of-current-and-Previous-Month/m-p/918209#M987662</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-07-29T15:25:48Z</dc:date>
    </item>
  </channel>
</rss>

