<?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 Set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293151#M108785</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone see what is wrong with this expression? Is it an issue with syntax? Or is it the fact that I cant embed set analysis into an if statement? Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;sum(if(analysis_a='11', {$&amp;lt;Date_MonthYear={"&amp;gt;=$(#v3Mth) &amp;lt;=$(#v1Mth)"}&amp;gt;} val*(36.75/100), {$&amp;lt;Date_MonthYear={"&amp;gt;=$(#v3Mth) &amp;lt;=$(#v1Mth)"}&amp;gt;} (val-(despatched_qty*cost_of_sale)))) &lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;﻿&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2011 10:28:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-23T10:28:05Z</dc:date>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293151#M108785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anyone see what is wrong with this expression? Is it an issue with syntax? Or is it the fact that I cant embed set analysis into an if statement? Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;sum(if(analysis_a='11', {$&amp;lt;Date_MonthYear={"&amp;gt;=$(#v3Mth) &amp;lt;=$(#v1Mth)"}&amp;gt;} val*(36.75/100), {$&amp;lt;Date_MonthYear={"&amp;gt;=$(#v3Mth) &amp;lt;=$(#v1Mth)"}&amp;gt;} (val-(despatched_qty*cost_of_sale)))) &lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;﻿&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 10:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293151#M108785</guid>
      <dc:creator />
      <dc:date>2011-08-23T10:28:05Z</dc:date>
    </item>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293152#M108786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;sum(if(analysis_a='11', {$&amp;lt;Date_MonthYear={"&amp;gt;=$(=#v3Mth) &amp;lt;=$(=#v1Mth)"}&amp;gt;} val*(36.75/100), {$&amp;lt;Date_MonthYear={"&amp;gt;=$(=#v3Mth) &amp;lt;=$(=#v1Mth)"}&amp;gt;} (val-(despatched_qty*cost_of_sale)))) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 10:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293152#M108786</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-08-23T10:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293153#M108787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a combination of both. You can use set analysis in an aggregation function such as Sum(), and use it in conjunction with an If() conditional, with the proper syntax. Besides, make sure that Date_MonthYear has a numeric value, because is what you are forcing when you interpret $(#v3Mth) (the "#" means the result must be interpreted as numeric). So it should look like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;sum({$&amp;lt; Date_MonthYear = {"&amp;gt;=$(#v3Mth)&amp;lt;=$(#v1Mth)"} &amp;gt;} if(analysis_a='11', val*(36.75/100), (val-(despatched_qty*cost_of_sale))))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 11:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293153#M108787</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-23T11:33:32Z</dc:date>
    </item>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293154#M108788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another question please: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put v3mth =date(addmonths(Date_MonthYear,-3),'MMM-YYYY') in my Variable Overview. This worked correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when i put it in my script, it did not work: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let v3mth = date(addmonths(Date_MonthYear,-12),'MMM-YYYY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas why this happened? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 13:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293154#M108788</guid>
      <dc:creator />
      <dc:date>2011-08-23T13:12:43Z</dc:date>
    </item>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293155#M108789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there something wrong with this expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=date(addmonths(Date_MonthYear,-24),'MMM-YYYY')&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 15:27:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293155#M108789</guid>
      <dc:creator />
      <dc:date>2011-08-23T15:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293156#M108790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the content of the field Date_MonthYear in each case? AddMonths() need a full date field (year, month, day) to work, and "-12" should be accepted as it is -3 or any other valid numeric value, hence my guess that the issue may be in the format of the values in Date_MonthYear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any case, values returned by that Date() are not numeric, so the expression above using $(#v3Mth) is unlikely to work. Do they work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; text-decoration: underline; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 15:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293156#M108790</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-23T15:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293157#M108791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, there's not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming Date_MonthYear has the value 23/08/2011 (format DD/MM/YYYY) your expression above should return "Aug-2009".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; text-decoration: underline; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 15:29:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293157#M108791</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-23T15:29:56Z</dc:date>
    </item>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293158#M108792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for the reply Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date_MonthYear contains a correct date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code does not work when I put it in the script, but it works correctly when I declare the variables in the Variable Overview.&lt;/P&gt;&lt;P&gt;Here is the code in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date as invoice_date,&lt;/P&gt;&lt;P&gt;date(monthstart(Date),'MMM-YYYY') as Date_MonthYear,&lt;/P&gt;&lt;P&gt;let vDate12 = date(addmonths(Date_MonthYear,-12),'MMM-YYYY');&lt;/P&gt;&lt;P&gt;let vDate24 = date(addmonths(Date_MonthYear,-24),'MMM-YYYY');&lt;/P&gt;&lt;P&gt;let vDateNow = Date_MonthYear;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 15:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293158#M108792</guid>
      <dc:creator />
      <dc:date>2011-08-23T15:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293159#M108793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script you need to pass on to the Date() functions only one value of all the possible in the field Date_MonthYear. According to your syntax, you are passing the field name, which will not work. Check the attached sample application on how to get that working in the load time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; text-decoration: underline; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 16:00:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293159#M108793</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-23T16:00:47Z</dc:date>
    </item>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293160#M108794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Miguel, I'll try that out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2011 16:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293160#M108794</guid>
      <dc:creator />
      <dc:date>2011-08-23T16:05:25Z</dc:date>
    </item>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293161#M108795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took the variables out of my script and declared them in the variable overview. The reason for doing this was because I didnt want the date to be static. For instance if I checked May-2010 I wanted the varibles to reflect this date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date_MonthYear is in my table "DateParts" at the beginning of my script.&lt;/P&gt;&lt;P&gt;"Date as Date&lt;/P&gt;&lt;P&gt;date(monthstart(Date), 'MMM-YYYY') as Date_MonthYear"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vDateNow = Date_MonthYear&lt;/P&gt;&lt;P&gt;vDate12 = date(addmonths(Date_MonthYear, -12),'MMM-YYYY')&lt;/P&gt;&lt;P&gt;vDate24 = date(addmonths(Date_MonthYear, -24),'MMM-YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three textboxes on my sheet. The values they display are as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Textbox1 - vDateNow: which gives me the value of the current selected month/year. For instance "May 2010"&lt;/LI&gt;&lt;LI&gt;Textbox2 - vDate12: which gives the value "May 2009"&lt;/LI&gt;&lt;LI&gt;Textbox3 - vDate24: which gives the value "May 2008"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my pivot chart I have a number of expression, for example the following, which gives me the correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({$&amp;lt; Date_MonthYear = {"&amp;gt;=$(vDate12)&amp;lt;=$(vDateNow)"} &amp;gt;} if(analysis_a='11', val*(36.75/100), (val-(despatched_qty*cost_of_sale))))&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however the current expressions are giving a '0' value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({$&amp;lt; Date_MonthYear = {"&amp;gt;=$(vDate24)&amp;lt;=$(vDate12)"} &amp;gt;} if(analysis_a='11', val*(36.75/100), (val-(despatched_qty*cost_of_sale))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a reason why the last expression will not work, even though the dates are being displayed with no problem on the textboxes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for leaving such a long post, I hope I explained it clearly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 11:08:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293161#M108795</guid>
      <dc:creator />
      <dc:date>2011-08-24T11:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293162#M108796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to your variable definitions, in all cases the result is a string. Strings can use the operators "follow" and "precede" is you want to make some text comparison, but this is not the case. So you need some additional transformation in either your expression or your script to get that right, something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Count({$&amp;lt; Date_MonthYear = {"=Date(Date#(Date_MonthYear, 'MMM YYYY')) &amp;gt;= Date(Date#($(vDate24), 'MMM YYYY'))", "=Date(Date#(Date_MonthYear, 'MMM YYYY')) &amp;lt;= Date(Date#($(vDate12), 'MMM YYYY'))"} &amp;gt;} if(analysis_a='11', val*(36.75/100), (val-(despatched_qty*cost_of_sale))))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now you are comparing a number to a number, which is fine. That seems too messy though, doesn't it? I'd rather play with the AddMonths function and the Date field (the complete DD/MM/YYYY field), so why not use instead&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Count({$&amp;lt; Date = {"&amp;gt;=$(=AddYears(vDateNow, -2))&amp;lt;=$(=AddYears(vDateNow, -1))"} &amp;gt;} if(analysis_a='11', val*(36.75/100), (val-(despatched_qty*cost_of_sale))))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And set vDateNow as a variable having a full date but represented as 'MMM YYYY', or even better, a Slider/Calendar object (calendar) where you select the month by clicking on any day of that month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 15:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293162#M108796</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-24T15:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293163#M108797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help Miguel!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 10:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/293163#M108797</guid>
      <dc:creator />
      <dc:date>2011-08-26T10:00:52Z</dc:date>
    </item>
  </channel>
</rss>

