<?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: Filter variable in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Filter-variable-in-set-analysis/m-p/1506343#M598712</link>
    <description>&lt;P&gt;No, but an variable has single value therefore you could use an if statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IF($(vFoo) = &amp;lt;10, Sum(Sales),0)&lt;/PRE&gt;</description>
    <pubDate>Wed, 14 Nov 2018 14:28:45 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2018-11-14T14:28:45Z</dc:date>
    <item>
      <title>Filter variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-variable-in-set-analysis/m-p/1506334#M598711</link>
      <description>&lt;P&gt;If i have a variable called vFoo. Can we filter this variable directly in set analysis?&lt;/P&gt;&lt;P&gt;Something like:&lt;BR /&gt;&lt;BR /&gt;Sum({$&amp;lt;$(vFoo) = {"&amp;lt;10"}&amp;gt;}Sales)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 14:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-variable-in-set-analysis/m-p/1506334#M598711</guid>
      <dc:creator>Nighthawk</dc:creator>
      <dc:date>2018-11-14T14:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filter variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-variable-in-set-analysis/m-p/1506343#M598712</link>
      <description>&lt;P&gt;No, but an variable has single value therefore you could use an if statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IF($(vFoo) = &amp;lt;10, Sum(Sales),0)&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Nov 2018 14:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-variable-in-set-analysis/m-p/1506343#M598712</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2018-11-14T14:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filter variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-variable-in-set-analysis/m-p/1506361#M598713</link>
      <description>&lt;P&gt;You can do this - but it is important that the vFoo will evaluate to something that is relevant and contains a field:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum( { &amp;lt;UniqueRowId={"=&lt;STRONG&gt;($(vFoo))&lt;/STRONG&gt;&amp;lt;10"}&amp;gt; } Sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the expression =$(vFoo)&amp;lt;10 should evaluate to a boolean result that determines which rows that would be included in the sum. If vFoo evaluates to a constant then the sum would be zero or if not the sum of all rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The field on the left hand side does not necessarily need to be a UniqueRowId but I find it easier to understand it and get it to work by having that as the field. If you have a non-unique row id as field means that the expression on the right hand side MUST have aggregation functions just like you would use in a "group by" in a SQL statement or LOAD statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 14:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-variable-in-set-analysis/m-p/1506361#M598713</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-11-14T14:42:55Z</dc:date>
    </item>
  </channel>
</rss>

