<?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 &amp;lt;= Operator in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241989#M502181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is PeriodSelection a field, or a variable?&lt;/P&gt;&lt;P&gt;If a field, then you shouldn't use the $ expansion. Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&amp;lt;pre&amp;gt;SUM({$&amp;lt;FinancialYear={$(=max(FinancialYear))}, PeriodNo={&lt;B&gt;"&amp;lt;=&lt;/B&gt;PeriodSelection"}&amp;gt;} [ExtendedInvoicePrice])&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;If its a variable, then I think Goran is correct. &lt;BR /&gt;&lt;BR /&gt;Jonathan&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Aug 2010 13:09:34 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2010-08-05T13:09:34Z</dc:date>
    <item>
      <title>Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241986#M502178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to be able to use the less than or equal to operator (&amp;lt;=) in a Set Analysis expression, but it doesn't appear to work.&lt;/P&gt;&lt;P&gt;The expression I have written is:&lt;/P&gt;&lt;P&gt;=SUM({$&amp;lt;FinancialYear={$(=max(FinancialYear))}, PeriodNo&amp;lt;={$(PeriodSelection)}&amp;gt;} [ExtendedInvoicePrice])&lt;/P&gt;&lt;P&gt;It seems as though the &amp;lt; symbol in &amp;lt;= is being related to the required &amp;lt; at the beginning of the statement (after the first $).&lt;/P&gt;&lt;P&gt;Does anyone have any ideas on what I need to do to get this to work correctly?&lt;/P&gt;&lt;P&gt;For info, this expression is supposed to return the total value of sales invoices in the current year (FinancialYear) up to and including the selected period (PeriodSelection).&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 12:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241986#M502178</guid>
      <dc:creator />
      <dc:date>2010-08-05T12:25:50Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241987#M502179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andrew,&lt;/P&gt;&lt;P&gt;Use instead&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=SUM({$&amp;lt;FinancialYear={$(=max(FinancialYear))}, PeriodNo={&lt;B&gt;&amp;lt;=&lt;/B&gt;$(PeriodSelection)}&amp;gt;} [ExtendedInvoicePrice])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 12:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241987#M502179</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-08-05T12:59:34Z</dc:date>
    </item>
    <item>
      <title>SV:Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241988#M502180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;=SUM({$&amp;lt;FinancialYear={$(=max(FinancialYear))}, PeriodNo={"&amp;lt;=$(=PeriodSelection)"}&amp;gt;} [ExtendedInvoicePrice])&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 13:04:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241988#M502180</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2010-08-05T13:04:49Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241989#M502181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is PeriodSelection a field, or a variable?&lt;/P&gt;&lt;P&gt;If a field, then you shouldn't use the $ expansion. Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&amp;lt;pre&amp;gt;SUM({$&amp;lt;FinancialYear={$(=max(FinancialYear))}, PeriodNo={&lt;B&gt;"&amp;lt;=&lt;/B&gt;PeriodSelection"}&amp;gt;} [ExtendedInvoicePrice])&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;If its a variable, then I think Goran is correct. &lt;BR /&gt;&lt;BR /&gt;Jonathan&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 13:09:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241989#M502181</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-05T13:09:34Z</dc:date>
    </item>
    <item>
      <title>SV:Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241990#M502182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goran - your expression has worked! Perfect! Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 13:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241990#M502182</guid>
      <dc:creator />
      <dc:date>2010-08-05T13:37:47Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241991#M502183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan - PeriodSelection is a variable and as you said Goran's suggestion is correct. Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 13:38:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241991#M502183</guid>
      <dc:creator />
      <dc:date>2010-08-05T13:38:34Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241992#M502184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel - your suggested expression did not work at all I'm afraid, it returned null values for all rows. Goran's suggested expression worked though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Aug 2010 13:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241992#M502184</guid>
      <dc:creator />
      <dc:date>2010-08-05T13:39:42Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241993#M502186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;STRONG&gt;Jonathan,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I was reading your post and I need to filter an dimension based on another dimension, just like you sugested.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In my case&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Max&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;({&amp;lt;&lt;B&gt;DataRegistro&lt;/B&gt;={'&amp;lt;=MesRef'}&amp;gt;} &lt;B&gt;DataRegistro&lt;/B&gt;) &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Where DataRegistro is a dimension on a table and MesRef is a Dimension on another table and is the main dimension on a Chart&lt;/P&gt;&lt;P&gt;My code does not work, always returnig null,&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 21:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241993#M502186</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2010-09-14T21:01:52Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with &lt;= Operator</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241994#M502189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Three possibilities that I can think of. First, I recommend putting literals in single quotes, and search expressions in double quotes. QlikView allows some overlap, but getting it wrong can cause problems sometimes. Second, if MesRef can have multiple values, then it will evaluate to null, so the expression won't work. In that case, you might need something like max(MesRef) instead. Third, unlike in normal expressions, when used in set analysis like this, dates must be in the same format to be compared. So if DataRegistro has values like "Aug 30, 2010" and MesRef has values like "30/8/2010", those are not comparable in set analysis. You would need to change the format of MesRef to match the set. Oh, and when making an expression inside of set analysis, you generally need to do it with dollar sign expansion.&lt;/P&gt;&lt;P&gt;So this probably won't work for YOUR data, but just to match up with the example I've given:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;max({&amp;lt;DataRegistro={"&amp;lt;=$(=date(max(MesRef),'MMM DD, YYYY'))"}&amp;gt;} DataRegistro)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 00:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-lt-Operator/m-p/241994#M502189</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-09-15T00:49:26Z</dc:date>
    </item>
  </channel>
</rss>

