<?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: top N by 2 dimensions table chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513496#M105338</link>
    <description>&lt;P&gt;If you didn't want to aggregate the data on Event and Action you will need to add a further appropriate information to differentiate between the n records.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2025 11:57:38 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2025-04-08T11:57:38Z</dc:date>
    <item>
      <title>top N by 2 dimensions table chart</title>
      <link>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513307#M105308</link>
      <description>&lt;P&gt;Hi, this should be relatively straight forward and I have tried 3 approaches without it working:&lt;BR /&gt;&lt;BR /&gt;I want the top 5 rows (not dimensions values) by #users in a straight table.&lt;BR /&gt;When i limit it by dimension I get the top 5 dimensions values which can mean more than 5 rows:&lt;BR /&gt;If i try a measure it does not work using aggregation:&lt;BR /&gt;&lt;BR /&gt;#Users = count(distinct USER_ID)&lt;/P&gt;
&lt;P&gt;AVG TIME = sum(TOTAL TIME] /&amp;nbsp;count(distinct USER_ID)&lt;BR /&gt;&lt;BR /&gt;am i missing something when i try the following?&lt;BR /&gt;&lt;BR /&gt;=SUM(aggr(if(rank(count(distinct USER_ID))&amp;lt;= 5, count(distinct USER_ID)), [EVENT ID], ACTION))&lt;BR /&gt;&lt;BR /&gt;I only want the green rows to show.&amp;nbsp; As you can see event id is not unique and neither is Action&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rx98u5pq_0-1744014310633.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/179411i0B9260FDACE509AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rx98u5pq_0-1744014310633.png" alt="rx98u5pq_0-1744014310633.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 08:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513307#M105308</guid>
      <dc:creator>rx98u5pq</dc:creator>
      <dc:date>2025-04-07T08:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: top N by 2 dimensions table chart</title>
      <link>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513327#M105314</link>
      <description>&lt;P&gt;Because in your data, Event ID = A and Action = 1 are present in two places,&lt;/P&gt;&lt;P&gt;So, in Qlik, the table will look like this. This is not something which can controlled using any sum, aggr or count function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sk88024_1-1744019323922.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/179416i3AA9380F291A969D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sk88024_1-1744019323922.png" alt="sk88024_1-1744019323922.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, to show top N only, you can use the limitation option for both dimensions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sk88024_2-1744019462995.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/179417iE5A0684612A99F5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sk88024_2-1744019462995.png" alt="sk88024_2-1744019462995.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then, the table will look like this -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sk88024_3-1744019526886.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/179418iA3951F35B52193FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sk88024_3-1744019526886.png" alt="sk88024_3-1744019526886.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 09:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513327#M105314</guid>
      <dc:creator>sk88024</dc:creator>
      <dc:date>2025-04-07T09:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: top N by 2 dimensions table chart</title>
      <link>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513366#M105322</link>
      <description>&lt;P&gt;Hi, thanks for the response but using the dimension filter for both dimensions does not work.&amp;nbsp; it still bring back the top 5 dimension values, which is not the top 5 rows, e.g. there could be two rows for A here when you use the filter.&lt;BR /&gt;this measure ended up working:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;If(
    Aggr(
        Rank(
            {&amp;lt;Event_ID = {"*"}&amp;gt;}[# Users],
            1, 1
        ),
        Event_ID
    ) &amp;lt;= 5,
    [# Users]
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 13:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513366#M105322</guid>
      <dc:creator>rx98u5pq</dc:creator>
      <dc:date>2025-04-07T13:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: top N by 2 dimensions table chart</title>
      <link>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513496#M105338</link>
      <description>&lt;P&gt;If you didn't want to aggregate the data on Event and Action you will need to add a further appropriate information to differentiate between the n records.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 11:57:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/top-N-by-2-dimensions-table-chart/m-p/2513496#M105338</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-04-08T11:57:38Z</dc:date>
    </item>
  </channel>
</rss>

