<?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: Dimention with rank and aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16417#M2707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌can y provide me with some sample data and your expected output I can try on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jun 2018 01:41:37 GMT</pubDate>
    <dc:creator>vishsaggi</dc:creator>
    <dc:date>2018-06-03T01:41:37Z</dc:date>
    <item>
      <title>Dimention with rank and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16412#M2702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: Arial; font-size: 10pt;"&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial; font-size: 10pt;"&gt;I'm trying to build a line chart with top 5 products (by total quantity in last year), and show their sales. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial; font-size: 10pt;"&gt;My data has 5 fields: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: 1pt solid #a3a3a3; border-image: none;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 4pt; border: 1pt solid #a3a3a3; border-image: none;"&gt;&lt;P style="color: black; font-family: Arial; font-size: 10pt;"&gt;Month&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 4pt; border: 1pt solid #a3a3a3; border-image: none;"&gt;&lt;P style="color: black; font-family: Arial; font-size: 10pt;"&gt;Year&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 4pt; border: 1pt solid #a3a3a3; border-image: none;"&gt;&lt;P style="color: black; font-family: Arial; font-size: 10pt;"&gt;Product&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 4pt; border: 1pt solid #a3a3a3; border-image: none;"&gt;&lt;P style="color: black; font-family: Arial; font-size: 10pt;"&gt;Sales&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 4pt; border: 1pt solid #a3a3a3; border-image: none;"&gt;&lt;P style="color: black; font-family: Arial; font-size: 10pt;"&gt;Quantity&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial; font-size: 10pt;"&gt;X axis should be month-year. Eg: Jan-16, Feb-16….Apr.2018&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial; font-size: 10pt;"&gt;Y axis should be sum of sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial; font-size: 10pt;"&gt;Dimension should be product, but only top 5 products with most sum of quantity in previous year (2017). I think this dimension is the hardest part in the chart. I'm thinking about aggr or rank function, but not sure exactly how to do it. &lt;BR /&gt; &lt;BR /&gt; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial; font-size: 10pt;"&gt;Yvonne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 14:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16412#M2702</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-25T14:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dimention with rank and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16413#M2703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Aggr(If(Rank(Sum({&amp;lt; Year = {'2017'} &amp;gt;} Quantity)) &amp;lt;=5, Product), Product)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 14:18:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16413#M2703</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-04-25T14:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dimention with rank and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16414#M2704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great. I think it worked. A follow up question, what if I want to group all other product into "Other" in the dimension. How do I modify the expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 14:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16414#M2704</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-25T14:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dimention with rank and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16415#M2705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you give an example? When you club other products your rank will change so just wondering what will be your expected output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2018 14:28:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16415#M2705</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-04-25T14:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dimention with rank and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16416#M2706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Vishwarath&lt;/P&gt;&lt;P&gt;I have the same problem and I have tried to adjust your formula to my table but i cannot get the expected result&lt;/P&gt;&lt;P&gt;I have a Table with a dimension "Account" and two measures in the following order "BP" (Business Plan) and "ACT" (Actual)&lt;/P&gt;&lt;P&gt;I selected a limitation (Fixed number) of the Top 5 accounts with the most expense and it is calculated on measure "BP" (as it is the first measure in the table). &lt;/P&gt;&lt;P&gt;How can i do to get the top 5 accounts calculated on measure "ACT" but without changing the order of the columns?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to your formula I have created the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+aggr(If(Rank(sum(ACT))&amp;lt;=5,Account),Account) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2018 01:23:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16416#M2706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-03T01:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dimention with rank and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16417#M2707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌can y provide me with some sample data and your expected output I can try on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2018 01:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16417#M2707</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-06-03T01:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dimention with rank and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16418#M2708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishwarath&lt;/P&gt;&lt;P&gt;I just get it!! My problem was I wrote&lt;SPAN style="font-size: 10pt;"&gt; the formula in Limitation option within Dimension. I had to write within the Measure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am very happy right now and thanks for your help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Btw the formula works without &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;writing&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; +aggr(). I have to study more about that topic in order to know the difference between write that expression (aggr) or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;KR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;A&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2018 02:08:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dimention-with-rank-and-aggregation/m-p/16418#M2708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-03T02:08:07Z</dc:date>
    </item>
  </channel>
</rss>

