<?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 reference to previous column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-reference-to-previous-column/m-p/199761#M58551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping someone can help with this? The equation below works - it counts the number of pharmacists in each pharmacy where the %compliance is above 0.65. However, the value 0.65 needs to refer to a previous column for each pharmacy i.e. there is value for each pharmacy that is calculated in a previous column.&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(distinct {$&amp;lt;PharmacistCCP = {"=(count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3'}&amp;gt;}ScriptNoNappiCode)/count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3','Non Formulary'}&amp;gt;}ScriptNoNappiCode))*0.9 &amp;gt; &lt;STRONG&gt;0.65&lt;/STRONG&gt;"}&amp;gt;}PharmacistCCP)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I just can't get it to work....this is what I have ended up with - I have hi-lighted the changes in bold.&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(distinct {$&amp;lt;PharmacistCCP = {"=(count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3'}&amp;gt;}ScriptNoNappiCode)/count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3','Non Formulary'}&amp;gt;}ScriptNoNappiCode))*0.9 &amp;gt; &lt;STRONG&gt;$(column(4))&lt;/STRONG&gt;"}&amp;gt;}PharmacistCCP)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Mar 2010 21:40:32 GMT</pubDate>
    <dc:creator>wandapec</dc:creator>
    <dc:date>2010-03-31T21:40:32Z</dc:date>
    <item>
      <title>Set Analysis with reference to previous column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-reference-to-previous-column/m-p/199761#M58551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping someone can help with this? The equation below works - it counts the number of pharmacists in each pharmacy where the %compliance is above 0.65. However, the value 0.65 needs to refer to a previous column for each pharmacy i.e. there is value for each pharmacy that is calculated in a previous column.&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(distinct {$&amp;lt;PharmacistCCP = {"=(count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3'}&amp;gt;}ScriptNoNappiCode)/count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3','Non Formulary'}&amp;gt;}ScriptNoNappiCode))*0.9 &amp;gt; &lt;STRONG&gt;0.65&lt;/STRONG&gt;"}&amp;gt;}PharmacistCCP)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I just can't get it to work....this is what I have ended up with - I have hi-lighted the changes in bold.&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(distinct {$&amp;lt;PharmacistCCP = {"=(count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3'}&amp;gt;}ScriptNoNappiCode)/count(distinct{$&amp;lt;FormularyDescription = {'Formulary 1','Formulary 2','Formulary 3','Non Formulary'}&amp;gt;}ScriptNoNappiCode))*0.9 &amp;gt; &lt;STRONG&gt;$(column(4))&lt;/STRONG&gt;"}&amp;gt;}PharmacistCCP)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 21:40:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-reference-to-previous-column/m-p/199761#M58551</guid>
      <dc:creator>wandapec</dc:creator>
      <dc:date>2010-03-31T21:40:32Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with reference to previous column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-reference-to-previous-column/m-p/199762#M58552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have the same problem ... anyone has a solution?&lt;/P&gt;&lt;P&gt;I have a straight table with columns A, B, C, D .. A and B being dimensions, C and D being expressions.&lt;/P&gt;&lt;P&gt;D shall be calculated based on the value appearing in the same row in column A.&lt;BR /&gt;I know that I can use the syntax [ A ] to refer to that column in the D-expression (e.g. D= [ A ] &amp;amp; ' extended').&lt;/P&gt;&lt;P&gt;But so far I fail to make it work in a set expression: D = sum({&amp;lt;MyField={ [ A ] &amp;amp; ' extended' }&amp;gt;} MyValue)&lt;BR /&gt;or better with $-expansion: D= sum({&amp;lt;MyField={$(=[ A ] &amp;amp; ' extended')}&amp;gt;} MyValue).&lt;/P&gt;&lt;P&gt;What do I miss?&lt;BR /&gt;Thanks for any reply,&lt;/P&gt;&lt;P&gt;Thilo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 12:12:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-reference-to-previous-column/m-p/199762#M58552</guid>
      <dc:creator />
      <dc:date>2010-07-20T12:12:15Z</dc:date>
    </item>
  </channel>
</rss>

