<?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 Does set analysis work when calling a variable with dollar sign expansion? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Does-set-analysis-work-when-calling-a-variable-with-dollar-sign/m-p/226362#M504365</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following is my variable definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;PrintX&lt;BR /&gt;if($1&amp;gt;0.9,'X',$1)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;When using expression A PrintX produces the correct result but with expression B it does not work.&lt;/P&gt;&lt;P&gt;ie A gives a list of numbers except for numbers larger than 0.9 where it writes an X.&lt;/P&gt;&lt;P&gt;Expression B gives null results.&lt;/P&gt;&lt;P&gt;Expression C gives correct decimal numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;A = $(PrintX(0.01* Count( distinct SalesID )))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;B =$(PrintX(Count( {$ &amp;lt; Status={"B","G","V"} &amp;gt;}&lt;BR /&gt;distinct SalesID) /&lt;BR /&gt; Count(distinct SalesID)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;C =Count( {$ &amp;lt; Status={"B","G","V"} &amp;gt;} distinct SalesID)&lt;BR /&gt;/&lt;BR /&gt; Count(distinct SalesID)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Maybe there is another way to write a character for ranges of numbers rather than using a $ sign expansion or am I doing something wrong in expression B?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jan 2010 09:01:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-29T09:01:46Z</dc:date>
    <item>
      <title>Does set analysis work when calling a variable with dollar sign expansion?</title>
      <link>https://community.qlik.com/t5/QlikView/Does-set-analysis-work-when-calling-a-variable-with-dollar-sign/m-p/226362#M504365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following is my variable definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;PrintX&lt;BR /&gt;if($1&amp;gt;0.9,'X',$1)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;When using expression A PrintX produces the correct result but with expression B it does not work.&lt;/P&gt;&lt;P&gt;ie A gives a list of numbers except for numbers larger than 0.9 where it writes an X.&lt;/P&gt;&lt;P&gt;Expression B gives null results.&lt;/P&gt;&lt;P&gt;Expression C gives correct decimal numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;A = $(PrintX(0.01* Count( distinct SalesID )))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;B =$(PrintX(Count( {$ &amp;lt; Status={"B","G","V"} &amp;gt;}&lt;BR /&gt;distinct SalesID) /&lt;BR /&gt; Count(distinct SalesID)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;C =Count( {$ &amp;lt; Status={"B","G","V"} &amp;gt;} distinct SalesID)&lt;BR /&gt;/&lt;BR /&gt; Count(distinct SalesID)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Maybe there is another way to write a character for ranges of numbers rather than using a $ sign expansion or am I doing something wrong in expression B?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 09:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Does-set-analysis-work-when-calling-a-variable-with-dollar-sign/m-p/226362#M504365</guid>
      <dc:creator />
      <dc:date>2010-01-29T09:01:46Z</dc:date>
    </item>
  </channel>
</rss>

