<?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 with Variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variables/m-p/149236#M27434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using variables in set analysis:&lt;BR /&gt;sum({1&amp;lt;"Fiscal Year"={$(PrevFY)}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2009 00:43:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-07-14T00:43:34Z</dc:date>
    <item>
      <title>Set Analysis with Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variables/m-p/149234#M27432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;BR /&gt; I have created variable called EndCompareDate that has a condition where it can only take date within the start of the year until the current date. (e.g. 01/2009, 02, 2009, 03/2009... etc). What I would like to do is when a user inputs a month/year into the variable, that input will change the parameter to the set analysis. This is what I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=(Count(ALL{&amp;lt;Dateentered = {EndCompareDate}&amp;gt;} Product))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The problem is that this returns 0, which clearly can't be because I ran the set analysis with EndCompareDate to be 06/2009 and I actually get a result. Can anyone see why this isn't working?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2009 23:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variables/m-p/149234#M27432</guid>
      <dc:creator />
      <dc:date>2009-07-13T23:57:59Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variables/m-p/149235#M27433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would try to avoid using ALL in expressions. While it is still supported, I believe the new "standard" is to use {1} to indicate the set of all values. That gives us this:&lt;/P&gt;&lt;P&gt;count({1&amp;lt;Dateentered={EndCompareDate}&amp;gt;} Product)&lt;/P&gt;&lt;P&gt;I also can't remember if you can reference variables directly like that. You may need to do a dollar sign expansion on it:&lt;/P&gt;&lt;P&gt;count({1&amp;lt;Dateentered={$(=EndCompareDate)}&amp;gt;} Product)&lt;/P&gt;&lt;P&gt;Finally, I don't guarantee that the dollar sign expansion will give you a date in the same format as field "Dateentered". So you might need to format the result. If Dateentered was in MM/DD/YY format, for instance, you might need to do this:&lt;/P&gt;&lt;P&gt;count({1&amp;lt;Dateentered={$(=date(EndCompareDate,'MM/DD/YY'))}&amp;gt;} Product)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 00:07:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variables/m-p/149235#M27433</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-07-14T00:07:25Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variables/m-p/149236#M27434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using variables in set analysis:&lt;BR /&gt;sum({1&amp;lt;"Fiscal Year"={$(PrevFY)}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 00:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Variables/m-p/149236#M27434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-14T00:43:34Z</dc:date>
    </item>
  </channel>
</rss>

