<?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 Calculated dimension with count and Set expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-with-count-and-Set-expressions/m-p/317741#M1200469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Luis,&lt;/P&gt;&lt;P&gt;I think that your calculate dimension is correct, it return luis and john that have type 2 and 3 and status D.&lt;/P&gt;&lt;P&gt;Explain why about you the second part whith the field &lt;B&gt;status&lt;/B&gt; doesn't work.&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;Luca&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Apr 2011 14:24:21 GMT</pubDate>
    <dc:creator>pljsoftware</dc:creator>
    <dc:date>2011-04-04T14:24:21Z</dc:date>
    <item>
      <title>Calculated dimension with count and Set expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-with-count-and-Set-expressions/m-p/317740#M1200468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a table like this:&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;id,user, type, status&lt;/P&gt;&lt;P&gt;1, luis, 2, D&lt;/P&gt;&lt;P&gt;2, john, 3, D&lt;/P&gt;&lt;P&gt;3, jose, 4, S&lt;/P&gt;&lt;P&gt;4, luis, 4, S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I' need to rank this table with a calculated dimension, that is I need to get the top 2 users whith type = {2, 3} and status = 'D'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a calculated dimension like this;:&lt;/P&gt;&lt;P&gt;=IF(Aggr(rank(Count({&amp;lt;type={2,3}, status= {D}&amp;gt;} id)),user)&amp;lt;=2, user)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn' seem to work. The first part, &lt;B&gt;type={2,3&lt;/B&gt;} works all right, but the second part whith the field &lt;B&gt;status&lt;/B&gt; doesn't. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 12:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-with-count-and-Set-expressions/m-p/317740#M1200468</guid>
      <dc:creator />
      <dc:date>2011-04-04T12:24:27Z</dc:date>
    </item>
    <item>
      <title>Calculated dimension with count and Set expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-with-count-and-Set-expressions/m-p/317741#M1200469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Luis,&lt;/P&gt;&lt;P&gt;I think that your calculate dimension is correct, it return luis and john that have type 2 and 3 and status D.&lt;/P&gt;&lt;P&gt;Explain why about you the second part whith the field &lt;B&gt;status&lt;/B&gt; doesn't work.&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;Luca&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 14:24:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-with-count-and-Set-expressions/m-p/317741#M1200469</guid>
      <dc:creator>pljsoftware</dc:creator>
      <dc:date>2011-04-04T14:24:21Z</dc:date>
    </item>
    <item>
      <title>Calculated dimension with count and Set expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-with-count-and-Set-expressions/m-p/317742#M1200470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;Load * inline [&lt;/P&gt;&lt;P&gt;id,user, type, status&lt;/P&gt;&lt;P&gt;1, luis, 2, D&lt;/P&gt;&lt;P&gt;2, john, 3, D&lt;/P&gt;&lt;P&gt;3, jose, 3, S&lt;/P&gt;&lt;P&gt;4, luis, 3, S&lt;/P&gt;&lt;P&gt;5, luis, 3, D&lt;/P&gt;&lt;P&gt;6, luis, 4, D&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;With the table above, my calculated dimension &lt;I style="font-weight:bold;"&gt;=IF(Aggr(rank(Count({&amp;lt;type={2,3}, status= {'S'}&amp;gt;} id)),user)&amp;lt;=2, user)&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I style="font-weight:bold;"&gt;&lt;/I&gt; and my &lt;I style="font-weight:bold;"&gt;&lt;/I&gt; expression &lt;I&gt;&lt;STRONG&gt;count(id)&lt;/STRONG&gt;&lt;/I&gt; I was expecting the result:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;luis - 1&lt;/DIV&gt;&lt;DIV&gt;jose - 1&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;But I get the result:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;luis - 4&lt;/DIV&gt;&lt;DIV&gt;jose - 1&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;That is, I want to count all the rows wich have the &lt;STRONG&gt;&lt;I&gt;type&lt;/I&gt;&lt;/STRONG&gt; equal to 2 or 3 and &lt;STRONG&gt;&lt;I&gt;status&lt;/I&gt;&lt;/STRONG&gt;='S' grouped by &lt;STRONG&gt;&lt;I&gt;user.&lt;/I&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Tks,&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Luis&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 16:17:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-with-count-and-Set-expressions/m-p/317742#M1200470</guid>
      <dc:creator />
      <dc:date>2011-04-04T16:17:18Z</dc:date>
    </item>
  </channel>
</rss>

