<?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: List box showing fewer values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/List-box-showing-fewer-values/m-p/1843048#M1215359</link>
    <description>&lt;P&gt;if you want top 7 based on your selections, you can use a calculated dimension in your filter object.&lt;/P&gt;&lt;P&gt;=aggr(if(rank([Year Quarter Field]) &amp;lt;= 7,&amp;nbsp;[Year Quarter Field]) ,[Year Quarter Field])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise you can create a flag (or another field entirely but that may be confusing on front end with conflicting selections) in your data model and use that in your filter object.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;load script flag:&lt;/P&gt;&lt;P&gt;data:&lt;BR /&gt;load * inline [&lt;BR /&gt;field&lt;BR /&gt;1&lt;BR /&gt;6&lt;BR /&gt;4&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;left join (data)&lt;BR /&gt;load field, 1 as is_top_2 resident data&lt;BR /&gt;where rowno() &amp;lt;2&lt;BR /&gt;order by field desc&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=if(is_top_2= 1,&amp;nbsp;[field])&lt;/P&gt;</description>
    <pubDate>Wed, 06 Oct 2021 15:18:15 GMT</pubDate>
    <dc:creator>stevejoyce</dc:creator>
    <dc:date>2021-10-06T15:18:15Z</dc:date>
    <item>
      <title>List box showing fewer values</title>
      <link>https://community.qlik.com/t5/QlikView/List-box-showing-fewer-values/m-p/1842973#M1215357</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;I have a list box that contains year/quarter but I only need to show the most recent 7 quarters.&lt;/P&gt;&lt;P&gt;2021 Q3&lt;/P&gt;&lt;P&gt;2021 Q2&lt;/P&gt;&lt;P&gt;2021 Q1&lt;/P&gt;&lt;P&gt;2020 Q4&lt;/P&gt;&lt;P&gt;2020 Q3&lt;/P&gt;&lt;P&gt;2020 Q2&lt;/P&gt;&lt;P&gt;2020 Q1 --&lt;/P&gt;&lt;P&gt;2019 Q4&lt;/P&gt;&lt;P&gt;2019 Q3&lt;/P&gt;&lt;P&gt;2019 Q2&lt;/P&gt;&lt;P&gt;2019 Q1&lt;/P&gt;&lt;P&gt;2018 Q4&lt;/P&gt;&lt;P&gt;2018 Q3&lt;/P&gt;&lt;P&gt;2018 Q2&lt;/P&gt;&lt;P&gt;2018 Q1&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 14:12:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/List-box-showing-fewer-values/m-p/1842973#M1215357</guid>
      <dc:creator>New2qlik1</dc:creator>
      <dc:date>2021-10-06T14:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: List box showing fewer values</title>
      <link>https://community.qlik.com/t5/QlikView/List-box-showing-fewer-values/m-p/1843048#M1215359</link>
      <description>&lt;P&gt;if you want top 7 based on your selections, you can use a calculated dimension in your filter object.&lt;/P&gt;&lt;P&gt;=aggr(if(rank([Year Quarter Field]) &amp;lt;= 7,&amp;nbsp;[Year Quarter Field]) ,[Year Quarter Field])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise you can create a flag (or another field entirely but that may be confusing on front end with conflicting selections) in your data model and use that in your filter object.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;load script flag:&lt;/P&gt;&lt;P&gt;data:&lt;BR /&gt;load * inline [&lt;BR /&gt;field&lt;BR /&gt;1&lt;BR /&gt;6&lt;BR /&gt;4&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;left join (data)&lt;BR /&gt;load field, 1 as is_top_2 resident data&lt;BR /&gt;where rowno() &amp;lt;2&lt;BR /&gt;order by field desc&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=if(is_top_2= 1,&amp;nbsp;[field])&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 15:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/List-box-showing-fewer-values/m-p/1843048#M1215359</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2021-10-06T15:18:15Z</dc:date>
    </item>
  </channel>
</rss>

