<?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 Expression - Counting Conditionally in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308074#M1182129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no experience of writing expressions in click view and could use a bit of help please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data loaded with one field called admitmethod (possible values are '1' or '2'). I have a pivot table in which I want to count another field called CRN which&lt;/P&gt;&lt;P&gt;is a unique identifier for individuals, but I only want to count those with an admitmewthod of '2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I write the expression for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried a few things but don't really understand the syntax. Thanks for any pointers....&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2011 16:44:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-16T16:44:03Z</dc:date>
    <item>
      <title>Expression - Counting Conditionally</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308074#M1182129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no experience of writing expressions in click view and could use a bit of help please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data loaded with one field called admitmethod (possible values are '1' or '2'). I have a pivot table in which I want to count another field called CRN which&lt;/P&gt;&lt;P&gt;is a unique identifier for individuals, but I only want to count those with an admitmewthod of '2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I write the expression for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried a few things but don't really understand the syntax. Thanks for any pointers....&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 16:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308074#M1182129</guid>
      <dc:creator />
      <dc:date>2011-12-16T16:44:03Z</dc:date>
    </item>
    <item>
      <title>Expression - Counting Conditionally</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308075#M1182130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count({&amp;lt;admitmethod = {'2'}&amp;gt;} CRN)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Dec 2011 00:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308075#M1182130</guid>
      <dc:creator />
      <dc:date>2011-12-17T00:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Expression - Counting Conditionally</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308076#M1182131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the CRN and admitmethod are in the same table, it may be worth doing something like this in the load of that table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(admitmethod='2',CRN) as "CRN with Admit Method 2" // or whatever name makes sense&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To simplify (and probably slightly speed up) your expression to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;count("CRN with Admit Method 2")&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Dec 2011 00:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308076#M1182131</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-12-17T00:19:20Z</dc:date>
    </item>
    <item>
      <title>Expression - Counting Conditionally</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308077#M1182132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is a very useful technique you highlight and works well for my purposes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 14:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Counting-Conditionally/m-p/308077#M1182132</guid>
      <dc:creator />
      <dc:date>2012-01-09T14:26:57Z</dc:date>
    </item>
  </channel>
</rss>

