<?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 Using a variable in set analysis (for compare) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-variable-in-set-analysis-for-compare/m-p/359073#M494959</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;The following expression works perfectly:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;CustomerID={'4'}&amp;gt;}distinct Orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if I insert a variable to replace the 4 as follows I get zero&lt;/P&gt;&lt;P&gt;=count({&amp;lt;CustomerID={'(v_Selected_CounterPart_ID)'}&amp;gt;}distinct Orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested the value in the variable and it is 4 so this should work. &lt;/P&gt;&lt;P&gt;The expression editor says the syntax is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable is declared as &lt;/P&gt;&lt;P&gt;=GetCurrentField(CounterPart)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very strange....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2012 20:10:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-19T20:10:21Z</dc:date>
    <item>
      <title>Using a variable in set analysis (for compare)</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-in-set-analysis-for-compare/m-p/359073#M494959</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;The following expression works perfectly:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;CustomerID={'4'}&amp;gt;}distinct Orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if I insert a variable to replace the 4 as follows I get zero&lt;/P&gt;&lt;P&gt;=count({&amp;lt;CustomerID={'(v_Selected_CounterPart_ID)'}&amp;gt;}distinct Orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested the value in the variable and it is 4 so this should work. &lt;/P&gt;&lt;P&gt;The expression editor says the syntax is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable is declared as &lt;/P&gt;&lt;P&gt;=GetCurrentField(CounterPart)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very strange....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 20:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-in-set-analysis-for-compare/m-p/359073#M494959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-19T20:10:21Z</dc:date>
    </item>
    <item>
      <title>Using a variable in set analysis (for compare)</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-in-set-analysis-for-compare/m-p/359074#M494960</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;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;CustomerID={"$(v_Selected_CounterPart_ID)"}&amp;gt;}distinct Orders)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 20:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-in-set-analysis-for-compare/m-p/359074#M494960</guid>
      <dc:creator />
      <dc:date>2012-03-19T20:14:15Z</dc:date>
    </item>
  </channel>
</rss>

