<?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: Addmonths with max date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588796#M218349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately I can't (size and proprietary).&amp;nbsp; But the structure looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp; Vintage, Sales, State&lt;/P&gt;&lt;P&gt;&amp;nbsp; 10/31/2009, 124303, Texas&lt;/P&gt;&lt;P&gt;&amp;nbsp; 10/31/2009, 84902, Florida&lt;/P&gt;&lt;P&gt;&amp;nbsp; 11/30/2009, 372928, California&lt;/P&gt;&lt;P&gt;&amp;nbsp; 11/30/2009, 84449, Ohio&lt;/P&gt;&lt;P&gt;&amp;nbsp; 12/31/2009, 48272, Indiana&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with the State as a dimension, and the vintages run for about 5 years (with all values at end of month).&amp;nbsp; Trying to find the average sales over the past 24 months in a given state.&amp;nbsp; Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Mar 2014 14:54:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-02T14:54:17Z</dc:date>
    <item>
      <title>Addmonths with max date</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588792#M218345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I'm trying to use the addmonths function, but apparently can't get the syntax right.&amp;nbsp; Any help is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=AddMonths({$&amp;lt;(=max(vDate))&amp;gt;}, -1, 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Mar 2014 23:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588792#M218345</guid>
      <dc:creator />
      <dc:date>2014-03-01T23:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths with max date</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588793#M218346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If vDate is variable&lt;/P&gt;&lt;P&gt;AddMonths('$(vDate)', 1)&lt;/P&gt;&lt;P&gt;This will add one month to your vDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vDate is normal date&lt;/P&gt;&lt;P&gt;AddMonths ('max(vDate )', 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try both of the above formula with and without single quotes&lt;/P&gt;&lt;P&gt;I. E.&amp;nbsp; ''&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Set Analysis.... Something like below&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Month = {'$(=AddMonths(max(vDate)), 1)'}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Mar 2014 00:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588793#M218346</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-02T00:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths with max date</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588794#M218347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&amp;nbsp; That isolated addmonths function now works.&amp;nbsp; But to your last set analysis example, how would I correct the following expression I'm using in a chart (focusing on the avg function):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//find average of the field Sales for when the field Vintage is between the latest date and 2 years before&lt;/P&gt;&lt;P&gt;avg({$&amp;lt;Vintage={"&amp;gt;=$(=AddMonths(max(Vintage),-24,1))&amp;lt;=$(=max(Vintage))"}&amp;gt;} [Sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Needless to say, I'm struggling with the nested functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Mar 2014 01:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588794#M218347</guid>
      <dc:creator />
      <dc:date>2014-03-02T01:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths with max date</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588795#M218348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share your sample file or apps?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Mar 2014 08:02:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588795#M218348</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-02T08:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Addmonths with max date</title>
      <link>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588796#M218349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately I can't (size and proprietary).&amp;nbsp; But the structure looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp; Vintage, Sales, State&lt;/P&gt;&lt;P&gt;&amp;nbsp; 10/31/2009, 124303, Texas&lt;/P&gt;&lt;P&gt;&amp;nbsp; 10/31/2009, 84902, Florida&lt;/P&gt;&lt;P&gt;&amp;nbsp; 11/30/2009, 372928, California&lt;/P&gt;&lt;P&gt;&amp;nbsp; 11/30/2009, 84449, Ohio&lt;/P&gt;&lt;P&gt;&amp;nbsp; 12/31/2009, 48272, Indiana&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with the State as a dimension, and the vintages run for about 5 years (with all values at end of month).&amp;nbsp; Trying to find the average sales over the past 24 months in a given state.&amp;nbsp; Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Mar 2014 14:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Addmonths-with-max-date/m-p/588796#M218349</guid>
      <dc:creator />
      <dc:date>2014-03-02T14:54:17Z</dc:date>
    </item>
  </channel>
</rss>

