<?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 Re: Counting sum in variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416645#M1150645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert&lt;/P&gt;&lt;P&gt;Thanks for your answer. I can't get it to work though. I have replaced Year with my Year field name (=[Year of appl.]), but all I get is a bunch og 0's &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 May 2013 09:44:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-01T09:44:22Z</dc:date>
    <item>
      <title>Counting sum in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416643#M1150643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Dear all&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Currently I'm working on a QV app. on applications to our University.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, I have a problem with counting the number of "small educations" (those educations that received 10 or less applications with 1. Priority) in each of my application years (2005-2013).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;My expression looks like this:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;count&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;[Education by city]&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=sum({&amp;lt;Priority={'1. Priority'}&amp;gt;} Number_of_students)&amp;lt;11"&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #0000ff;"&gt;distinct&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[Education by city&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;]&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;And it works fine whenever I select only one Year (2011 as an example underneath). But when I want 2 or more years to show, the expression counts applications for each Education regardless of which Year they are received. For example if the Education "Biology" received 9 applications in 2011 it's considered a "small education" and should therefore count as +1 in the column "Small Educations" in 2011. However if I choose 3 Years (2011, 2012, 2013) Biology received: 2011: 9 appl., 2012 8. appl., 2013 14 appl.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;It should count as +1 in the column "Small Educations" in 2011 and 2012, but not 2013, but it does'nt count at all in any of the Years because the expression adds the applications of all 3 Years together (=31 which is above 10).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;How do I correct this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; * "All" means all applications - not all Educations (there is aprox. 70 Educations each year)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;IMG __jive_id="40140" class="jive-image" alt="Year_file.png" src="https://community.qlik.com/legacyfs/online/40140_Year_file.png" /&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cheers&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Bruno&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 09:10:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416643#M1150643</guid>
      <dc:creator />
      <dc:date>2013-05-01T09:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Counting sum in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416644#M1150644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Arial; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-family: Arial; color: #0000ff;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-family: Arial; background-color: #ffffff;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-family: Arial; color: #800000;"&gt;[Education by city]&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-family: Arial; background-color: #ffffff;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-family: Arial; color: #800000;"&gt;"=&lt;STRONG&gt;aggr(&lt;/STRONG&gt;sum({&amp;lt;Priority={'1. Priority'}&amp;gt;} Number_of_students),&lt;STRONG&gt;Year)&lt;/STRONG&gt;&amp;lt;11"&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-family: Arial; background-color: #ffffff;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-family: Arial; color: #0000ff;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-family: Arial; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-family: Arial; color: #800000;"&gt;[Education by city&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-family: Arial; color: #800000;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-family: Arial; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace Year with the name of your year field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 09:29:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416644#M1150644</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-01T09:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counting sum in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416645#M1150645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert&lt;/P&gt;&lt;P&gt;Thanks for your answer. I can't get it to work though. I have replaced Year with my Year field name (=[Year of appl.]), but all I get is a bunch og 0's &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 09:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416645#M1150645</guid>
      <dc:creator />
      <dc:date>2013-05-01T09:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Counting sum in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416646#M1150646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, it doesn't do what I expect it to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this will work:&lt;/P&gt;&lt;P&gt;count(distinct if(aggr(sum({&amp;lt;Priority={'1. Priority'}&amp;gt;} Number_of_students),[Education by city],[Year of appl.])&amp;lt;11,[Education by city]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 12:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416646#M1150646</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-01T12:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Counting sum in variable</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416647#M1150647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked perfectly! Thanks a lot &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 May 2013 12:31:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-sum-in-variable/m-p/416647#M1150647</guid>
      <dc:creator />
      <dc:date>2013-05-01T12:31:31Z</dc:date>
    </item>
  </channel>
</rss>

