<?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: Filter the data from expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Filter-the-data-from-expressions/m-p/931282#M979059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please attach the sample application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Aug 2015 02:32:56 GMT</pubDate>
    <dc:creator>qlikviewwizard</dc:creator>
    <dc:date>2015-08-29T02:32:56Z</dc:date>
    <item>
      <title>Filter the data from expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-the-data-from-expressions/m-p/931281#M979058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set where I have to sort the data ascending and descending as per the filtered option.&lt;/P&gt;&lt;P&gt;Here is an example of what I need to do:&lt;/P&gt;&lt;P&gt;Data set -&lt;/P&gt;&lt;P&gt;1. Countries, Profit margins&lt;/P&gt;&lt;P&gt;2. Range of profit margins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First filter - Take upper or lower profit margins&lt;/P&gt;&lt;P&gt;Second filter - ascending or descending&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a chart and list box with the if statements : =if((sum(ALLOCATION1_EBIT)/sum([LC-NET_REV]))&amp;gt;=Upper, 'Yes', 'No')&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; (sum(ALLOCATION1_EBIT)/sum([LC-NET_REV]) = Profit margins&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I get something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TH bgcolor="#f5f5f5" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Customer Country&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;OPM Upper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;OPM Lower&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;No&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;No&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Albania&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Yes&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;No&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Algeria&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;No&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Yes&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Andorra&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;No&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;No&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Angola&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Yes&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;Etc&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;Etc----&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;Etc---&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Now I need to filter with OPM Upper or Lower. Can someone please help?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;---&amp;gt;A-man&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 15:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-the-data-from-expressions/m-p/931281#M979058</guid>
      <dc:creator />
      <dc:date>2015-08-28T15:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Filter the data from expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-the-data-from-expressions/m-p/931282#M979059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please attach the sample application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 02:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-the-data-from-expressions/m-p/931282#M979059</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-08-29T02:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Filter the data from expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-the-data-from-expressions/m-p/931283#M979060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you will need aggr() to create such filter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Listbox-expression with and without if-loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(aggr(sum(ALLOCATION1_EBIT)/sum([LC-NET_REV]), [&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Customer Country&lt;/STRONG&gt;&lt;/SPAN&gt;])&amp;gt;=Upper, 'Yes', 'No')&lt;/P&gt;&lt;P&gt;aggr(round(sum(ALLOCATION1_EBIT)/sum([LC-NET_REV]), 0.01), [&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Customer Country&lt;/STRONG&gt;&lt;/SPAN&gt;])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe an alternatively is to cluster the results with class - within the listbox or in the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class(aggr(sum(ALLOCATION1_EBIT)/sum([LC-NET_REV]), [&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Customer Country&lt;/STRONG&gt;&lt;/SPAN&gt;]), 0.01)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 10:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-the-data-from-expressions/m-p/931283#M979060</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-29T10:21:12Z</dc:date>
    </item>
  </channel>
</rss>

