<?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 Next month (problem when month=12) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978432#M960135</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greeting, i want to calculate the values of the previous and the following month and i use this formula for the previous:&lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;Right(Max(Mês) - 1, 2) = '0',&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Mês = {$(=max(Mês+11))}, Ano = {$(=max(Ano)-1)}, TipoDados={'Orçamento'}&amp;gt;} Valor),&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Mês = {$(=max(Mês)-1)},Ano = {$(=max(Ano)) }, TipoDados={'Orçamento'}&amp;gt;} Valor)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somehow, i can't manage to get the analogue formula for the next month.&lt;/P&gt;&lt;P&gt;Please help me if you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Simão Ribeiro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Oct 2015 09:34:15 GMT</pubDate>
    <dc:creator>slribeiro</dc:creator>
    <dc:date>2015-10-28T09:34:15Z</dc:date>
    <item>
      <title>Next month (problem when month=12)</title>
      <link>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978432#M960135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greeting, i want to calculate the values of the previous and the following month and i use this formula for the previous:&lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;Right(Max(Mês) - 1, 2) = '0',&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Mês = {$(=max(Mês+11))}, Ano = {$(=max(Ano)-1)}, TipoDados={'Orçamento'}&amp;gt;} Valor),&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Mês = {$(=max(Mês)-1)},Ano = {$(=max(Ano)) }, TipoDados={'Orçamento'}&amp;gt;} Valor)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somehow, i can't manage to get the analogue formula for the next month.&lt;/P&gt;&lt;P&gt;Please help me if you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Simão Ribeiro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 09:34:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978432#M960135</guid>
      <dc:creator>slribeiro</dc:creator>
      <dc:date>2015-10-28T09:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Next month (problem when month=12)</title>
      <link>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978433#M960136</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;Does the previous month formula work well with month 12?&lt;/P&gt;&lt;P&gt;The problem you are getting with next month formula occurs only for month 12, or it fails regardless of the month?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;João Duarte&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:13:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978433#M960136</guid>
      <dc:creator>jduarte12</dc:creator>
      <dc:date>2015-10-28T14:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Next month (problem when month=12)</title>
      <link>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978434#M960137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The previous formula works perfectly for every months but it calculates the value of the previous month and i want the opposite formula to calculate the same value but this time for the following month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978434#M960137</guid>
      <dc:creator>slribeiro</dc:creator>
      <dc:date>2015-10-28T14:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Next month (problem when month=12)</title>
      <link>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978435#M960138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you have a full date field in your data model you should be able to use the AddMonths() function to calculate previous and following time periods and then you can extract the year and month from the resulting date. This function is smart enough to set January as the following month to December so you won't have to worry about that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cesar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 14:55:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978435#M960138</guid>
      <dc:creator>cesaraccardi</dc:creator>
      <dc:date>2015-10-28T14:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Next month (problem when month=12)</title>
      <link>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978436#M960139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simão,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following:&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;If(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Max(Mês)&amp;nbsp; = 12,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({$&amp;lt;Mês = {$(=max(Mês-11))}, Ano = {$(=max(Ano)+1)}, TipoDados={'Orçamento'}&amp;gt;} Valor),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({$&amp;lt;Mês = {$(=max(Mês)+1)},Ano = {$(=max(Ano)) }, TipoDados={'Orçamento'}&amp;gt;} Valor)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Addmonths() should also work, as it has been said.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 15:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978436#M960139</guid>
      <dc:creator>jduarte12</dc:creator>
      <dc:date>2015-10-28T15:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Next month (problem when month=12)</title>
      <link>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978437#M960140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You could also do it like this:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Right(Max(Mês), 2) = '12',&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;Mês = {1}, Ano = {$(=max(Ano)+1)}, TipoDados={'Orçamento'}&amp;gt;} Valor),&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({$&amp;lt;Mês = {$(=max(Mês)+1)},Ano = {$(=max(Ano)) }, TipoDados={'Orçamento'}&amp;gt;} Valor)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 15:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Next-month-problem-when-month-12/m-p/978437#M960140</guid>
      <dc:creator>cesaraccardi</dc:creator>
      <dc:date>2015-10-28T15:56:09Z</dc:date>
    </item>
  </channel>
</rss>

