<?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: Displaying top 5 in table with repeating values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1513264#M36563</link>
    <description>&lt;P&gt;Thank you for your reply. I tried using Rank Function&lt;/P&gt;&lt;PRE&gt;=IF(Aggr(Rank(Count(DISTINCT {&amp;lt;Year= {1820}&amp;gt;} Student_ID),4),School)&amp;lt;=5,School)&lt;/PRE&gt;&lt;P&gt;But the output only shows the top 4 schools as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ranking.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1142iA7E1CA5B365BEB1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ranking.PNG" alt="ranking.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2018 05:05:52 GMT</pubDate>
    <dc:creator>natalieghx</dc:creator>
    <dc:date>2018-11-28T05:05:52Z</dc:date>
    <item>
      <title>Displaying top 5 in table with repeating values</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511351#M36470</link>
      <description>&lt;P&gt;Hi, I have a table that shows the Top 5 schools and the number of students in that school in 2017 and 2018. I would like to find the top 5 schools with the highest number of students in 2018.&lt;/P&gt;&lt;P&gt;To do so, I used this code as a calculated dimension:&lt;/P&gt;&lt;P&gt;=Aggr(If(Count(DISTINCT If(Year=2018, Student_ID)) &amp;gt;=Max(TOTAL Aggr(&lt;SPAN&gt;Count(DISTINCT If(&lt;/SPAN&gt;&lt;SPAN&gt;Year=2018&lt;/SPAN&gt;&lt;SPAN&gt;, Student_ID))&lt;/SPAN&gt;, School), 5), School), School)&lt;/P&gt;&lt;P&gt;The result is the table below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Top 5 Schools.PNG" style="width: 458px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/922i81E01DE9E7E8AB5B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Top 5 Schools.PNG" alt="Top 5 Schools.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, I want to get the table below where if 2 schools have the same number of students (e.g. School 8 &amp;amp; 15) , the table is display the next school with the highest number of students (e.g. School 6 &amp;amp; 18) until there is a total of 5 unique number of students.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Top 5 Schools Correct.PNG" style="width: 442px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/923i9CDDEB709DCB4330/image-size/large?v=v2&amp;amp;px=999" role="button" title="Top 5 Schools Correct.PNG" alt="Top 5 Schools Correct.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:50:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511351#M36470</guid>
      <dc:creator>natalieghx</dc:creator>
      <dc:date>2024-11-16T21:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying top 5 in table with repeating values</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511548#M36475</link>
      <description>&lt;P&gt;Your expression seems to be working fine for me.... the only thing I really changed when I tested was to change the inner if statement to set analysis.... but that should not change the output... would you be able to share a sample to show the issue?&lt;/P&gt;&lt;PRE&gt;=Aggr(If(Count(DISTINCT {&amp;lt;Year = {2018}&amp;gt;} Student_ID) &amp;gt;= Max(TOTAL Aggr(Count(DISTINCT {&amp;lt;Year = {2018}&amp;gt;} Student_ID), School), 5), School), School)&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Nov 2018 12:38:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511548#M36475</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-23T12:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying top 5 in table with repeating values</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511761#M36483</link>
      <description>&lt;P&gt;Hi, I'm afraid I am not able to share a sample to show the issue. Sorry! However, I&amp;nbsp;&lt;SPAN&gt;changed the inner if statement to set analysis but like you said,&amp;nbsp;it did not change the output but thank you for your response!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 03:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511761#M36483</guid>
      <dc:creator>natalieghx</dc:creator>
      <dc:date>2018-11-24T03:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying top 5 in table with repeating values</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511925#M36486</link>
      <description>no problem. I hope someone else is able to help.&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Sunny</description>
      <pubDate>Mon, 26 Nov 2018 01:08:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1511925#M36486</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-26T01:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying top 5 in table with repeating values</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1512049#M36487</link>
      <description>&lt;P&gt;you can try rank function with certain offset in set analysis&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 09:08:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1512049#M36487</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-26T09:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying top 5 in table with repeating values</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1513264#M36563</link>
      <description>&lt;P&gt;Thank you for your reply. I tried using Rank Function&lt;/P&gt;&lt;PRE&gt;=IF(Aggr(Rank(Count(DISTINCT {&amp;lt;Year= {1820}&amp;gt;} Student_ID),4),School)&amp;lt;=5,School)&lt;/PRE&gt;&lt;P&gt;But the output only shows the top 4 schools as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ranking.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1142iA7E1CA5B365BEB1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ranking.PNG" alt="ranking.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 05:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-top-5-in-table-with-repeating-values/m-p/1513264#M36563</guid>
      <dc:creator>natalieghx</dc:creator>
      <dc:date>2018-11-28T05:05:52Z</dc:date>
    </item>
  </channel>
</rss>

