<?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: Previous 'N' Month calculation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723334#M55046</link>
    <description>&lt;P&gt;Where do you want to show? In a Chart?&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2020 03:28:09 GMT</pubDate>
    <dc:creator>Saravanan_Desingh</dc:creator>
    <dc:date>2020-06-30T03:28:09Z</dc:date>
    <item>
      <title>Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723331#M55044</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The requirement is, when I select a particular month say 'March' for an year say '2020', All the previous months must also be displayed say 'Jan','Feb' and 'March'. How could i achieve this?&amp;nbsp;&amp;nbsp; Please help me out.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723331#M55044</guid>
      <dc:creator>Dhineshwaran</dc:creator>
      <dc:date>2021-12-20T21:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723334#M55046</link>
      <description>&lt;P&gt;Where do you want to show? In a Chart?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 03:28:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723334#M55046</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-06-30T03:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723335#M55047</link>
      <description>&lt;P&gt;In a bar chart as well as in a table view. Once I select the parameter, I need this to reflect in both the analysis.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 03:31:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723335#M55047</guid>
      <dc:creator>Dhineshwaran</dc:creator>
      <dc:date>2020-06-30T03:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723364#M55051</link>
      <description>&lt;P&gt;You can accomplish this by introducing set analysis into your chart and table expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The set will differ based on how you want the logict to be, but your header states "Previous 'N' months" so try something like this.&lt;/P&gt;&lt;P&gt;Assuming your original expression is SUM([Amount]) and N=4. I also you have four calendar fields Year, Month, Date and YearMonth that you need to ignore in order to get the expression right. With these assumptions an expression could look like this.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Sum({&amp;lt;Year, Month, YearMonth, Date = {"&amp;gt;=$(=addmonths(max(Date),-4))&amp;lt;=$(=max(Date))"}&amp;gt;}[Amount])&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 05:56:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723364#M55051</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-06-30T05:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723891#M55085</link>
      <description>&lt;P&gt;The expression is not working sir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My&amp;nbsp; Requirement is , When i select the&amp;nbsp; Year is 2020&amp;nbsp; and Month is May in filter pane, the&amp;nbsp; line chart should display Jan to May.if I select AUG,the line chart should display 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to display like this in table and line chart.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 10:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723891#M55085</guid>
      <dc:creator>Dhineshwaran</dc:creator>
      <dc:date>2020-07-01T10:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723985#M55087</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;dimension- Month&lt;/P&gt;&lt;P&gt;exprssion-&amp;nbsp; sum({&amp;lt;month={"&amp;lt;=$(=max(month))"}&amp;gt;}premium)&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 11:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1723985#M55087</guid>
      <dc:creator>NitinK7</dc:creator>
      <dc:date>2020-07-01T11:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1725276#M55224</link>
      <description>&lt;P&gt;Hi Nitin,&lt;/P&gt;&lt;P&gt;I have tried the expression but its not working .&lt;/P&gt;&lt;P&gt;My Expression is&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MONTH_NAME={"&amp;lt;=$(=max(MONTH_NAME))"}&amp;gt;}[XXBI_GL_GROUP_BALANCE_V.PTD_VALUE])&lt;/P&gt;&lt;P&gt;KIndly&amp;nbsp; advise on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhinesh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 10:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1725276#M55224</guid>
      <dc:creator>Dhineshwaran</dc:creator>
      <dc:date>2020-07-06T10:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1725282#M55225</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;can you attach you data for this two field, it is easy to find solution&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 10:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1725282#M55225</guid>
      <dc:creator>NitinK7</dc:creator>
      <dc:date>2020-07-06T10:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1725409#M55253</link>
      <description>&lt;P&gt;Set modifiers always look for the text of a dual when comparing a value. (Assuming your field is a dual value with month name and month number, probably created by using the Month() function)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Max(MONTH_NAME) will return a numeric value of your dual value and you will have no match. Try replacing max with maxstring() like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MONTH_NAME={"&amp;lt;=$(= &lt;STRONG&gt;MaxString&lt;/STRONG&gt;(MONTH_NAME))"}&amp;gt;}[XXBI_GL_GROUP_BALANCE_V.PTD_VALUE])&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 14:24:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1725409#M55253</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-06T14:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1727688#M55469</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Apologies, tried something like this but not successful.&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MONTH_NAME={"&amp;lt;=$(= MaxString(MONTH_NAME))"},[XXBI_GL_GROUP_BALANCE_V.DISPLAY_FLAG]= {"Y"},&lt;BR /&gt;[XXBI_GL_GROUP_BALANCE_V.ACCT_GROUP_NAME] = {"Revenue"}&amp;gt;}[XXBI_GL_GROUP_BALANCE_V.PTD_VALUE]).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhinesh&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 12:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1727688#M55469</guid>
      <dc:creator>Dhineshwaran</dc:creator>
      <dc:date>2020-07-14T12:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1729023#M55586</link>
      <description>&lt;P&gt;Hi Vegar,&lt;/P&gt;&lt;P&gt;Can you help me to sort out this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhinesh&lt;/P&gt;&lt;P&gt;(+91) 9894024763&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 12:08:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1729023#M55586</guid>
      <dc:creator>Dhineshwaran</dc:creator>
      <dc:date>2020-07-19T12:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Previous 'N' Month calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1729826#M55658</link>
      <description>&lt;P&gt;Check out the attached qvf file.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_1-1595407327454.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37865iDDFDA8C63798450C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vegar_1-1595407327454.png" alt="Vegar_1-1595407327454.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In top chart I'm using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=sum({&amp;lt;
   //[YEAR] = {'$(=Max(YEAR))'},
   [MONTH]={"&amp;lt;=$(=Max(MONTH))"},
   [XXBI_GL_GROUP_BALANCE_V.DISPLAY_FLAG]= {"Y"},
   [XXBI_GL_GROUP_BALANCE_V.ACCT_GROUP_NAME] = {"Revenue"}&amp;gt;}
[XXBI_GL_GROUP_BALANCE_V.PTD_VALUE])&lt;/LI-CODE&gt;&lt;P&gt;In the bottom chart&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=sum({&amp;lt;
   [YEAR] = {'$(=Max(YEAR))'},
   [MONTH]={"&amp;lt;=$(=Max(MONTH))"},
   [XXBI_GL_GROUP_BALANCE_V.DISPLAY_FLAG]= {"Y"},
   [XXBI_GL_GROUP_BALANCE_V.ACCT_GROUP_NAME] = {"Revenue"}&amp;gt;}
[XXBI_GL_GROUP_BALANCE_V.PTD_VALUE])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Notice that when logical comparing using &amp;lt;= on [MONTH] I use Max() not MaxString() as I don't want to logical compare the string value.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 08:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-N-Month-calculation/m-p/1729826#M55658</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-22T08:46:19Z</dc:date>
    </item>
  </channel>
</rss>

