<?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 Variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286107#M106428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a report which uses variables to make calculations (based on time). All of a sudden, certain variables have stopped working (i.e. calculating the appropriate figues, im now getting a 0 value, as opposed to the correct figure)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These variables are as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;- vCurrentMth1 = &lt;STRONG&gt;max(Date_MonthYear)&lt;/STRONG&gt;&amp;nbsp; - and this calculates the correct month (May 2011) and the correct figure, so everything is ok here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- vCurrentMth12 = &lt;STRONG&gt;date(addmonths(date(today()-30,'MMM-YYYY'),-12),'MMM-YYYY')&lt;/STRONG&gt; - this calculates the figures for May 2010 (12 months previous) and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; im getting a 0 value for this, but it worked ok before&amp;nbsp;&amp;nbsp; (incidently, when i put this variable in a text object, the correct month is displayed - "May 2010")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- vCurrentMthTwelve &lt;STRONG&gt;= date(addmonths(Date_MonthYear,-12),'MMM-YYYY')&lt;/STRONG&gt;&amp;nbsp; - my report displays a 0 value for this also... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas as to why im receiving these values? Any help would be greatly appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2011 10:28:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-14T10:28:41Z</dc:date>
    <item>
      <title>Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286107#M106428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a report which uses variables to make calculations (based on time). All of a sudden, certain variables have stopped working (i.e. calculating the appropriate figues, im now getting a 0 value, as opposed to the correct figure)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These variables are as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;- vCurrentMth1 = &lt;STRONG&gt;max(Date_MonthYear)&lt;/STRONG&gt;&amp;nbsp; - and this calculates the correct month (May 2011) and the correct figure, so everything is ok here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- vCurrentMth12 = &lt;STRONG&gt;date(addmonths(date(today()-30,'MMM-YYYY'),-12),'MMM-YYYY')&lt;/STRONG&gt; - this calculates the figures for May 2010 (12 months previous) and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; im getting a 0 value for this, but it worked ok before&amp;nbsp;&amp;nbsp; (incidently, when i put this variable in a text object, the correct month is displayed - "May 2010")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- vCurrentMthTwelve &lt;STRONG&gt;= date(addmonths(Date_MonthYear,-12),'MMM-YYYY')&lt;/STRONG&gt;&amp;nbsp; - my report displays a 0 value for this also... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas as to why im receiving these values? Any help would be greatly appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 10:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286107#M106428</guid>
      <dc:creator />
      <dc:date>2011-06-14T10:28:41Z</dc:date>
    </item>
    <item>
      <title>Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286108#M106429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see anything wrong.&lt;/P&gt;&lt;P&gt;All options works fine with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share your document so we can take a closer look?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 10:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286108#M106429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-14T10:42:51Z</dc:date>
    </item>
    <item>
      <title>Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286109#M106430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Theres alot of "sensitive" information on the doc, I dont think my boss would be too pleased if i posted it online!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully I'll find some solution...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 11:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286109#M106430</guid>
      <dc:creator />
      <dc:date>2011-06-14T11:03:46Z</dc:date>
    </item>
    <item>
      <title>Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286110#M106431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible that you are using those values in a set analysis or conditional without quoting them? Since the results are non numeric, they might be quoted. Not as well that QlikView is case sensitive, and "May" is not the same as "may", and the blanks are not equal to the "-" sign you are using in some of your code above in the date formatting.&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; 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, 14 Jun 2011 11:13:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286110#M106431</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-14T11:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286111#M106432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;I agree with Dennis, everything looks right. I understand that you can't post the sample document because of confidentiality. I am assuming that you understand the variable behaviour with "=" and without "=" while defining the variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;I mean when you use the equal to sign "=" beginning of your variable expression then the behaviour is different without using "=". If you use the "=" at the beginning of your expression while defining the variable then QV will evaluate the variable only once for entire document compared to each dimension while not using "=" at the beginning of the expression. I mean if you dont use "=" at the beginning it is dollar sign expansion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;I am just guessing a possiblity of what could be an issue. I am might be wrong, but this is just a guess.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Cheers - &lt;STRONG&gt;DV&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 11:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286111#M106432</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-06-14T11:14:37Z</dc:date>
    </item>
    <item>
      <title>Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286112#M106433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Understand, you have to be careful with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you maybe reproduce the problem in an empty/new Qlikview document.&lt;/P&gt;&lt;P&gt;Or at least show waht you mean with :"im getting a 0 value for this".&lt;/P&gt;&lt;P&gt;Where do you get this and how are you using your variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 11:14:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286112#M106433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-14T11:14:44Z</dc:date>
    </item>
    <item>
      <title>Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286113#M106434</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;Try&lt;/P&gt;&lt;P&gt;vCurrentMth12 = num(date(addmonths(date(today()-30,'MMM-YYYY'),-12),'MMM-YYYY'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 11:18:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286113#M106434</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2011-06-14T11:18:44Z</dc:date>
    </item>
    <item>
      <title>Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Variables/m-p/286114#M106435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its working correctly now. Basically I have 2 list boxes, one for month and another for year. I think the issue was with the year listbox, when I deselected it the correct figures appeared on my report. I still have a bit of work to do but I think the main issue has been pretty much resolved, thanks for your help guys&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 14:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables/m-p/286114#M106435</guid>
      <dc:creator />
      <dc:date>2011-06-14T14:19:19Z</dc:date>
    </item>
  </channel>
</rss>

