<?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 Problem with &amp;quot;AddMonths&amp;quot; , and displaying results for the previous month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problem-with-quot-AddMonths-quot-and-displaying-results-for-the/m-p/1426304#M34070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!...&lt;/P&gt;&lt;P&gt;Newbie question here. I am very excited to finally work with Qlik...but the syntax is a bit of a mystery...&lt;/P&gt;&lt;P&gt;I have been through the forums back and forth and tried so many combinations of this already...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the latest version of Qlik Sense server.&lt;/P&gt;&lt;P&gt;I am trying to display the number of accounts for specific periods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My date filed is: "System_Date"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 variables: the last month , and the previous month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set vMax_System_Date = Max(System_Date) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set vMax_System_Date_minus_1 = AddMonths(Max(System_Date),-1,1) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They both work when I display the results in a KPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following formula works and gives me the count for the last month:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; =count(&amp;nbsp;&amp;nbsp; { $&amp;lt; System_Date = {'$(=$(vMax_System_Date))'}&amp;nbsp; &amp;gt;} Account_ID )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I substitute the variable for the previous month variable, it does not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; =count(&amp;nbsp;&amp;nbsp; { $&amp;lt; System_Date = {'$(=$(vMax_System_Date_minus_1))'}&amp;nbsp; &amp;gt;} Account_ID )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody knows what to do, and more importantly...why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;&lt;P&gt;JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2017 07:11:25 GMT</pubDate>
    <dc:creator>jclabeau</dc:creator>
    <dc:date>2017-12-05T07:11:25Z</dc:date>
    <item>
      <title>Problem with "AddMonths" , and displaying results for the previous month</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-quot-AddMonths-quot-and-displaying-results-for-the/m-p/1426304#M34070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!...&lt;/P&gt;&lt;P&gt;Newbie question here. I am very excited to finally work with Qlik...but the syntax is a bit of a mystery...&lt;/P&gt;&lt;P&gt;I have been through the forums back and forth and tried so many combinations of this already...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the latest version of Qlik Sense server.&lt;/P&gt;&lt;P&gt;I am trying to display the number of accounts for specific periods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My date filed is: "System_Date"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 variables: the last month , and the previous month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set vMax_System_Date = Max(System_Date) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set vMax_System_Date_minus_1 = AddMonths(Max(System_Date),-1,1) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They both work when I display the results in a KPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following formula works and gives me the count for the last month:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; =count(&amp;nbsp;&amp;nbsp; { $&amp;lt; System_Date = {'$(=$(vMax_System_Date))'}&amp;nbsp; &amp;gt;} Account_ID )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I substitute the variable for the previous month variable, it does not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; =count(&amp;nbsp;&amp;nbsp; { $&amp;lt; System_Date = {'$(=$(vMax_System_Date_minus_1))'}&amp;nbsp; &amp;gt;} Account_ID )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody knows what to do, and more importantly...why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;&lt;P&gt;JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 07:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-quot-AddMonths-quot-and-displaying-results-for-the/m-p/1426304#M34070</guid>
      <dc:creator>jclabeau</dc:creator>
      <dc:date>2017-12-05T07:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with "AddMonths" , and displaying results for the previous month</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-quot-AddMonths-quot-and-displaying-results-for-the/m-p/1426305#M34071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JC Labeau, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe you should remove the extra 1 in addmonths and add a corresponding date format. So if System_Date is formatted as YYYY/MM/DD then use the following variable setup. &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; Set vMax_System_Date_minus_1 = DATE(AddMonths(Max(System_Date),-1) ,'YYYY/MM/DD' );&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 08:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-quot-AddMonths-quot-and-displaying-results-for-the/m-p/1426305#M34071</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-12-05T08:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with "AddMonths" , and displaying results for the previous month</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-quot-AddMonths-quot-and-displaying-results-for-the/m-p/1426306#M34072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Share a sample piece of data if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your variables seems fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 08:50:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-quot-AddMonths-quot-and-displaying-results-for-the/m-p/1426306#M34072</guid>
      <dc:creator>techvarun</dc:creator>
      <dc:date>2017-12-05T08:50:29Z</dc:date>
    </item>
  </channel>
</rss>

