<?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: How to get the first N -  using a string function - dimension value in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-get-the-first-N-using-a-string-function-dimension-value/m-p/2052059#M86489</link>
    <description>&lt;P&gt;Thanks, this worked. Weird that I had to add an extra one, but I am guessing that Null or blank must be ranked at the end in my real data set (needs cleaning).&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2023 13:44:35 GMT</pubDate>
    <dc:creator>datagrrl</dc:creator>
    <dc:date>2023-03-22T13:44:35Z</dc:date>
    <item>
      <title>How to get the first N -  using a string function - dimension value</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-get-the-first-N-using-a-string-function-dimension-value/m-p/2045097#M85980</link>
      <description>&lt;P&gt;This seems simple, but it is evading me this morning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="datagrrl_0-1677856631505.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/101918iB81F48283DC0326E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="datagrrl_0-1677856631505.png" alt="datagrrl_0-1677856631505.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If I want to see the "Top 2" or "bottom 2"&amp;nbsp; (or whatever number) alphabetically (nothing to do with the measures) how would I do that?&amp;nbsp; In my example I only want to see Mexico and the USA, but if Turkey was added I would want to see Turkey and the US. I want to see the last two alphabetically.&lt;/P&gt;
&lt;P&gt;This is a dummy example, and I included my dummy file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any assistance is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 15:22:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-get-the-first-N-using-a-string-function-dimension-value/m-p/2045097#M85980</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2023-03-03T15:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the first N -  using a string function - dimension value</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-get-the-first-N-using-a-string-function-dimension-value/m-p/2045155#M85985</link>
      <description>&lt;P&gt;Hi Datagrrl,&lt;/P&gt;
&lt;P&gt;This is a tricky one... Since Dimension Limits can only be applied to the first Measure, which is Sales, there is no easy way of limiting the chart to the top (bottom) entries in the alphabetical order.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only way is to limit the data in the Measure using Set Analysis. I managed to get the last two countries (Mexico and US) with the following formula. For other situations, you may need to tweak it a bit, but you can see the general direction:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Country={"=rank(Country)&amp;lt;=2"}&amp;gt;} Sales)&lt;/P&gt;
&lt;P&gt;To my great surprise, the function Rank() appears to work for strings as well!&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 17:04:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-get-the-first-N-using-a-string-function-dimension-value/m-p/2045155#M85985</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2023-03-03T17:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the first N -  using a string function - dimension value</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-get-the-first-N-using-a-string-function-dimension-value/m-p/2052059#M86489</link>
      <description>&lt;P&gt;Thanks, this worked. Weird that I had to add an extra one, but I am guessing that Null or blank must be ranked at the end in my real data set (needs cleaning).&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 13:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-get-the-first-N-using-a-string-function-dimension-value/m-p/2052059#M86489</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2023-03-22T13:44:35Z</dc:date>
    </item>
  </channel>
</rss>

