<?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: Set Analysis with Dates - Previous Months based on current date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844553#M296571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Colin, if you create your variable as:&lt;/P&gt;&lt;P&gt;=Date('22/02/2015', 'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;(Starting with equal sign)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this expression:&lt;/P&gt;&lt;P&gt;='Current Date using vCurrentDate : ' &amp;amp; Date(Max({ &amp;lt;Date={'$(=vCurrentDate)'}&amp;gt; } Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Apr 2015 10:55:13 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2015-04-02T10:55:13Z</dc:date>
    <item>
      <title>Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844552#M296570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm trying to get results based on a current date (YTD, most recent full Month/Quarter etc.) using the following...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Set vCurrentDate= &lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;('22/02/2015', 'DD/MM/YYYY')&amp;nbsp; &lt;SPAN style="color: #00ea00;"&gt;// This would not be hard coded but as this is an example it serves the purpose.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;With the following Set Analysis equation I get the desired result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;='Current Month when date Hard Coded : ' &amp;amp; &lt;SPAN style="color: #0000ff;"&gt;MaxString&lt;/SPAN&gt;({&amp;lt; &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;={'22/02/2015'} &amp;gt;} &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;) // Returns 22/02/2015&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But this just returns the maximum result stored in the calendar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;='Current Date using vCurrentDate : ' &amp;amp; &lt;SPAN style="color: #0000ff;"&gt;MaxString&lt;/SPAN&gt;({ &amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=$(vCurrentDate)"&lt;/SPAN&gt;}&amp;gt; } &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I've tried various formats and achieved nothing. i.e. &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;={'&lt;SPAN style="color: #800000;"&gt;$(vCurrentDate)'&lt;/SPAN&gt;} etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;See attached App for issues and CSV used for Dates&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 10:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844552#M296570</guid>
      <dc:creator />
      <dc:date>2015-04-02T10:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844553#M296571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Colin, if you create your variable as:&lt;/P&gt;&lt;P&gt;=Date('22/02/2015', 'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;(Starting with equal sign)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this expression:&lt;/P&gt;&lt;P&gt;='Current Date using vCurrentDate : ' &amp;amp; Date(Max({ &amp;lt;Date={'$(=vCurrentDate)'}&amp;gt; } Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 10:55:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844553#M296571</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-02T10:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844554#M296572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Refer this file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vimlesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 10:57:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844554#M296572</guid>
      <dc:creator />
      <dc:date>2015-04-02T10:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844555#M296573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't work but I added one more $ and bracket in it and it is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Date using vCurrentDate : ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({ &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=&lt;STRONG&gt;$(&lt;/STRONG&gt;vCurrentDate&lt;STRONG&gt;)&lt;/STRONG&gt;)'}&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844555#M296573</guid>
      <dc:creator />
      <dc:date>2015-04-02T11:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844556#M296574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vimlesh, this looks really good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might take a bit of time to review it all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844556#M296574</guid>
      <dc:creator />
      <dc:date>2015-04-02T11:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844557#M296575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, just to comment, I didn't copy the right expression!!:&lt;/P&gt;&lt;P&gt;For variable:&lt;/P&gt;&lt;P&gt;=Date('22/02/2015', 'DD/MM/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;='Current Date using vCurrentDate : ' &amp;amp; Date(Max({&amp;lt;Date={'$(vCurrentDate)'}&amp;gt; } Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844557#M296575</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-02T11:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844558#M296576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Ruben. When I use your code I get&amp;nbsp; "&lt;EM&gt;&lt;STRONG style="color: #6a6a6a;"&gt;Error in set modifier ad hoc element list&lt;/STRONG&gt;&lt;/EM&gt;: ',' or ')' expected"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below works&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Date using vCurrentDate : ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=$(vCurrentDate))'}&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844558#M296576</guid>
      <dc:creator />
      <dc:date>2015-04-02T11:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844559#M296577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vimlesh.. Excellant samples for Set Analysis. - Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 12:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844559#M296577</guid>
      <dc:creator />
      <dc:date>2015-04-02T12:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844560#M296578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Colin, just to explain the difference... that happens if you didn't add the first equal sign in the variable value, with the equal sign the expression is expanded like:&lt;/P&gt;&lt;P&gt;='Current Date using vCurrentDate : ' &amp;amp; Date(Max({&amp;lt;Date={'&lt;STRONG&gt;22/02/2015&lt;/STRONG&gt;'}&amp;gt; } Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the equal is trying something like:&lt;/P&gt;&lt;P&gt;='Current Date using vCurrentDate : ' &amp;amp; Date(Max({&amp;lt;Date={'&lt;STRONG&gt;Date('22/02/2015', 'DD/MM/YYYY')&lt;/STRONG&gt;'}&amp;gt; } Date))&lt;/P&gt;&lt;P&gt;And that has a lot of extra quotes, bringing the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your last expression works because you're adding the equal before the variable expansion and a double step expansion:&lt;/P&gt;&lt;P&gt;First step:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Date using vCurrentDate : ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=&lt;STRONG&gt;Date('22/02/2015', 'DD/MM/YYYY')&lt;/STRONG&gt;)'}&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Second step:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Date using vCurrentDate : ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&lt;STRONG style="font-size: 8pt;"&gt;22/02/2015&lt;/STRONG&gt;'}&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 11:21:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844560#M296578</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-03T11:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844561#M296579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the explanation Ruben.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set the variable in the Script so didn't think I needed to worry about it again (and thus dismissed your initial comment about adding =). See that you've updated it in the Variable Overview Editor and added the = there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would I be right is saying that the difference between my version and your version is that QlikView is treating my version (&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('22/02/2015', 'DD/MM/YYYY')&amp;nbsp; &lt;/SPAN&gt;) as a string and your version (&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('22/02/2015', 'DD/MM/YYYY'))&lt;/SPAN&gt; as a number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. &lt;SPAN style="font-size: 8pt;"&gt;='vCurrentDate : ' &amp;amp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrentDate) &lt;/EM&gt;&lt;/STRONG&gt; returns "vCurrentDate : 0.00549..." and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='vCurrentDate : ' &amp;amp; '$(vCurrentDate)' returns "vCurrentDate 22/02/2015"? I'd probably have expected to see 42057.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for taking the time with this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 11:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844561#M296579</guid>
      <dc:creator />
      <dc:date>2015-04-03T11:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844562#M296580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Colin, transforming each expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;='vCurrentDate : ' &amp;amp; &lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vCurrentDate) &lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;is transformed a&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;s ='vCurrentDate : ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;22/02/2015 &amp;lt;-- This is a division: 22 / 2 = 11 / 2015 = 0.00549...&lt;/SPAN&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Following operators priority division and multiplication are executed before addition and substration, and the '&amp;amp;' used for concatenate strings is treated as an 'addition' of strings, so first it does the division and then the contenation of the result as a string&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='vCurrentDate : ' &amp;amp; '$(vCurrentDate)' is transformed as &lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;='vCurrentDate : ' &amp;amp; '&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;22/02/2015' &amp;lt;-- This is a concatenation of two strings&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;='vCurrentDate : ' &amp;amp; Num('$(vCurrentDate)') is transformed as &lt;SPAN style="color: #000000; font-size: 10pt;"&gt;='vCurrentDate : ' &amp;amp; Num('&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;22/02/2015&lt;/SPAN&gt;') &amp;lt;-- QV is smart enough to interpret the string as a date and returns it's numerical value of 42057&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 14:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844562#M296580</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-03T14:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844563#M296581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just one detail, for other users loking for the same question, the answer you marked as correct is the one I pasted wrong. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 14:55:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844563#M296581</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-03T14:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Dates - Previous Months based on current date</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844564#M296582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Updated, thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it looks like a duck....&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 15:13:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Dates-Previous-Months-based-on-current-date/m-p/844564#M296582</guid>
      <dc:creator />
      <dc:date>2015-04-03T15:13:08Z</dc:date>
    </item>
  </channel>
</rss>

