<?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: Variables in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730502#M675412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Try some thing like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {'&amp;lt;$(= vPeriods)'}&amp;gt;} If(AC2='70', BalanceLC)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2014 09:08:25 GMT</pubDate>
    <dc:creator>sasikanth</dc:creator>
    <dc:date>2014-07-08T09:08:25Z</dc:date>
    <item>
      <title>Variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730500#M675410</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 expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {'&amp;lt;=3'}&amp;gt;} If(AC2='70', BalanceLC))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works like a charm, summing up all values where the month is smaller than 3. Now I would like to replace the 3 with a variable, but I can't get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script I have defined&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vPeriods = 3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I try to replace the 3 with vPeriods it doesn't show any values. How can I use the variable in this expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using CTRL+ALT+V shows that the variable exists and has the proper value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/61893_pastedImage_2.png" style="width: 620px; height: 473px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {'&amp;lt;=vPeriods'}&amp;gt;} If(AC2='70', BalanceLC)) = All values below limit&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {'&amp;lt;='&amp;amp;$(vPeriods)}&amp;gt;} If(AC2='70', BalanceLC)) = No data to display&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {'&amp;lt;='$(vPeriods)}&amp;gt;} If(AC2='70', BalanceLC)) = No data to display&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {$('&amp;lt;='&amp;amp;vPeriods)}&amp;gt;} If(AC2='70', BalanceLC)) = All values below limit&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {"&amp;lt;=vPeriods"}&amp;gt;} If(AC2='70', BalanceLC)) = All values below limit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is used to create the field MonthSort (cos our Fiscal Year starts in April):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;MonthName, MonthSort, FMonth&lt;/P&gt;&lt;P&gt;APR, 1, 01&lt;/P&gt;&lt;P&gt;MAY, 2, 02&lt;/P&gt;&lt;P&gt;JUN, 3, 03&lt;/P&gt;&lt;P&gt;JUL, 4, 04&lt;/P&gt;&lt;P&gt;AUG, 5, 05&lt;/P&gt;&lt;P&gt;SEP, 6, 06&lt;/P&gt;&lt;P&gt;OCT, 7, 07&lt;/P&gt;&lt;P&gt;NOV, 8, 08&lt;/P&gt;&lt;P&gt;DEC, 9, 09&lt;/P&gt;&lt;P&gt;JAN, 10, 10&lt;/P&gt;&lt;P&gt;FEB, 11, 11&lt;/P&gt;&lt;P&gt;MAR, 12, 12&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 08:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730500#M675410</guid>
      <dc:creator />
      <dc:date>2014-07-08T08:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730501#M675411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead this, better if you can provide some sample data... easy to work and answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 08:54:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730501#M675411</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-07-08T08:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730502#M675412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Try some thing like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {'&amp;lt;$(= vPeriods)'}&amp;gt;} If(AC2='70', BalanceLC)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730502#M675412</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2014-07-08T09:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730503#M675413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Matthias &lt;/P&gt;&lt;P&gt;please refer this link&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:16:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730503#M675413</guid>
      <dc:creator>noman212</dc:creator>
      <dc:date>2014-07-08T09:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730504#M675414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sasikanth_Narne&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, this got me on the right track.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Debug={'Budget'}, MonthSort = {'&amp;lt;=$(=vPeriods)&amp;gt;'}&amp;gt;} If(AC2='70', BalanceLC))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems to do the trick &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730504#M675414</guid>
      <dc:creator />
      <dc:date>2014-07-08T09:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730505#M675415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u r welcome&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Set-Analysis/m-p/730505#M675415</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2014-07-08T09:24:05Z</dc:date>
    </item>
  </channel>
</rss>

