<?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 using variable leads to &amp;quot;Error in set modifier&amp;quot; in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506136#M1133423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding an equals sign to your variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Year &amp;amp; '-' &amp;amp; Num(Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post your app?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Nov 2013 17:42:52 GMT</pubDate>
    <dc:creator>Jason_Michaelides</dc:creator>
    <dc:date>2013-11-28T17:42:52Z</dc:date>
    <item>
      <title>Set Analysis using variable leads to "Error in set modifier"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506135#M1133422</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 have a "TableX" which contains (among others) the fields:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;- &lt;STRONG&gt;XPeriod&lt;/STRONG&gt; which contains values such as '2013-11', '2013-10' etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;- &lt;STRONG&gt;XRecNo&lt;/STRONG&gt; this field always contains "1" and I use it for more efficient record counting (better and faster than COUNT())&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 also have a Calendar in the application but its not linked to "TableX".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;The calendar has all the typical Year, Month, Day components. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;When the user makes a Year/Month selection, I have defined a variable called "&lt;STRONG&gt;eSelectedPeriod&lt;/STRONG&gt;" which I have defined as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp; &lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: verdana, geneva;"&gt;Year &amp;amp; '-' &amp;amp; num(Month)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;... so when the user makes a year/month selection, "&lt;STRONG&gt;eSelectedPeriod&lt;/STRONG&gt;" contains the correct value (e.g. 2013-11)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;My requirement is simple. I want to return the sum of XRecNo where XPeriod = eSelectionPeriod &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;&lt;STRONG style=": ; font-family: verdana, geneva;"&gt;= sum({$&amp;lt;[XPeriod] = {'$(eSelectedPeriod)'}&amp;gt;}XRecNo)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;does not work - brings up the error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;&lt;EM&gt;"Error in set modifier ad hoc element list: '.' or ')' expected&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;If I create a test variable (say &lt;STRONG&gt;vTestPeriod&lt;/STRONG&gt;) that contains a value (say) '2013-11'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;then:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;= sum({$&amp;lt;[XPeriod] = {'$(vTestPeriod)'}&amp;gt;}XRecNo) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;= sum({$&amp;lt;[XPeriod] = {"$(vTestPeriod)"}&amp;gt;}XRecNo) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;both work fine &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva;"&gt;Can someone explain to what I need to do differently in the case where a variable has to be evaluated?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2013 17:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506135#M1133422</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-11-28T17:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis using variable leads to "Error in set modifier"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506136#M1133423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding an equals sign to your variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Year &amp;amp; '-' &amp;amp; Num(Month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post your app?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2013 17:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506136#M1133423</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-11-28T17:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis using variable leads to "Error in set modifier"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506137#M1133424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess, while you are defining your variable in the variable overview window, you are missing '=' sing. Put an '=' before your definition expression of the variable and try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2013 17:46:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506137#M1133424</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-11-28T17:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis using variable leads to "Error in set modifier"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506138#M1133425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well done Jason (and treseco)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Putting an equal sign solved the problem - I knew it would be simple - this was driving me insane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both variants of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;[XPeriod] = {'$(eSelectedPeriod)'}&amp;gt;} XRecNo)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // without equal sign &lt;/P&gt;&lt;P&gt;= sum({$&amp;lt;[XPeriod] = {'$(=eSelectedPeriod)'}&amp;gt;} XRecNo)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // with an equal sign&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see to work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2013 17:52:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-variable-leads-to-quot-Error-in-set-modifier/m-p/506138#M1133425</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-11-28T17:52:55Z</dc:date>
    </item>
  </channel>
</rss>

