<?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: Error using a variable in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927388#M947601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how did you define your variable?&lt;/P&gt;&lt;P&gt;Did you USE SET or LET?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly use the variable as it is without dollar Sign&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Dec 2015 22:16:19 GMT</pubDate>
    <dc:creator>Gabriel</dc:creator>
    <dc:date>2015-12-14T22:16:19Z</dc:date>
    <item>
      <title>Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927387#M947600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot figure out what is wrong with my Set Analysis.&amp;nbsp; My variable eCurrFY returns the correct value 'FY2016' when I put it in a textbox using this formula:&lt;/P&gt;&lt;P&gt;=$(eCurrFY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use it in a set analysis formula&lt;/P&gt;&lt;P&gt;=$(eCurrFY)&amp;amp;'&amp;nbsp;&amp;nbsp; '&lt;/P&gt;&lt;P&gt;&amp;amp;sum({&amp;lt;[Project Accounting Period]=, [Fiscal Year]={$(eCurrFY)}&amp;gt;} [Burdened Cost])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error shown below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2015-12-14_16-43-29.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109002_2015-12-14_16-43-29.jpg" style="height: 303px; width: 620px;" /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I write the formula as&lt;/P&gt;&lt;P&gt;=$(eCurrFY)&amp;amp;'&amp;nbsp;&amp;nbsp; '&lt;/P&gt;&lt;P&gt;&amp;amp;sum({&amp;lt;[Project Accounting Period]=, [Fiscal Year]={'FY2016'&lt;SPAN style="font-size: 13.3333px;"&gt;}&amp;gt;} [Burdened Cost])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I get the correct answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried&lt;/P&gt;&lt;P&gt;=$(eCurrFY)&amp;amp;'&amp;nbsp;&amp;nbsp; '&lt;/P&gt;&lt;P&gt;&amp;amp;sum({&amp;lt;[Project Accounting Period]=, [Fiscal Year]={'$(eCurrFY)'}&amp;gt;} [Burdened Cost])&lt;/P&gt;&lt;P&gt;but also get the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My variable is defined as:&lt;/P&gt;&lt;P&gt;if(month(today())&amp;lt;7,'FY'&amp;amp;year(today()),'FY'&amp;amp;(Year(Today())+1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 22:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927387#M947600</guid>
      <dc:creator>mla3eruva</dc:creator>
      <dc:date>2015-12-14T22:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927388#M947601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how did you define your variable?&lt;/P&gt;&lt;P&gt;Did you USE SET or LET?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly use the variable as it is without dollar Sign&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 22:16:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927388#M947601</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2015-12-14T22:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927389#M947602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mark,&lt;/P&gt;&lt;P&gt;Try to add an equal sign to the start of your variable:&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;if(month(today())&amp;lt;7,'FY'&amp;amp;year(today()),'FY'&amp;amp;(Year(Today())+1))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 22:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927389#M947602</guid>
      <dc:creator>morgankejerhag</dc:creator>
      <dc:date>2015-12-14T22:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927390#M947603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using as $(=eCurrFY) instead of $(eCurrFY)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 23:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927390#M947603</guid>
      <dc:creator>hemhund2016</dc:creator>
      <dc:date>2015-12-14T23:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927391#M947604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Hi Mark,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You can get the expected result in two ways.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. Try below expression,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;=$(=eCurrFY) &amp;amp;'&amp;nbsp;&amp;nbsp; ' &amp;amp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;sum({&amp;lt;[Project Accounting Period]=, [Fiscal Year]={"$(=eCurrFY)"}&amp;gt;} [Burdened Cost])&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. Add equal sign in front of the variable (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;eCurrFY&lt;/SPAN&gt;) definition in variable overview window.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="109000" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109000_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let me know.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 01:40:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927391#M947604</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2015-12-15T01:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927392#M947605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tamil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked when I added an = sign in front of the variable definition.&amp;nbsp; I thought that I should not include = sign in variable definitions (I'm loading all variables/expressions from Excel file.&amp;nbsp; Is there a rule or guideline about when variable/expression definitions should/should not include an = sign?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 19:40:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927392#M947605</guid>
      <dc:creator>mla3eruva</dc:creator>
      <dc:date>2015-12-15T19:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927393#M947606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Include the = in the variable definition when there is only one value to be calculated for the entire app. eg&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=today()-7&amp;nbsp; // 7 days ago&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leave the = off when the calculation needs to be calculated row by row for a chart.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Sum(Sales) * 1.2&amp;nbsp;&amp;nbsp;&amp;nbsp; // calc sales with commission&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your expression, if you look at the substitution, you would see that the expression string, not "FY2016" was getting substituted into the set modifier like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;[Fiscal Year]={'&lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;if(month(today())&amp;lt;7,'FY'&amp;amp;year(today()),'FY'&amp;amp;(Year(Today())+1))&lt;/SPAN&gt;'}&lt;/SPAN&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;&lt;BR /&gt;&lt;/SPAN&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;How do you see exactly what substitution is being done in the $()? Use the expression in a straight table and leave the expression label blank. The column heading will show the expression after substitution. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are a couple of posts that may help explain.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3444"&gt;The Magic of Dollar Expansions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com/" rel="nofollow"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/" rel="nofollow"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 20:33:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927393#M947606</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-12-15T20:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error using a variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927394#M947607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always use = sign for formulas/calculations in variable window. so that the calculated value will be stored in the variable. We can use the variable by simply mentioning the variable name like $(eCurrFY) in set analysis. If you don't want to add = sign in variable window, you can specify the variable like [Fiscal Year]={"$(=$(eCurrFY))"} in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test yourself ,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="109135" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109135_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set Expression:&lt;/STRONG&gt; sum({&amp;lt;[Project Accounting Period]=, [Fiscal Year]={"$(eCurrFY)"}&amp;gt;} [Burdened Cost])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="109136" alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/109136_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Set Expression:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;sum({&amp;lt;[Project Accounting Period]=, [Fiscal Year]={"$(=$(eCurrFY))"}&amp;gt;} [Burdened Cost])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For values&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="109137" alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/109137_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Set Expression:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;sum({&amp;lt;[Project Accounting Period]=, [Fiscal Year]={"$(eCurrFY)"}&amp;gt;} [Burdened Cost])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Choice is yours.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 02:07:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-using-a-variable-in-Set-Analysis/m-p/927394#M947607</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2015-12-16T02:07:55Z</dc:date>
    </item>
  </channel>
</rss>

