<?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 Condition in a List Box in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289802#M585314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you entered above in tab expression of a list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to limit your field values, I think you need to use the expression in field selection in tab general.&lt;/P&gt;&lt;P&gt;Go to tab general, open drop down list "Field" and at the very end, there you can select &amp;lt;Expression&amp;gt; and enter any expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Aug 2011 11:40:51 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-08-22T11:40:51Z</dc:date>
    <item>
      <title>Condition in a List Box</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289801#M585313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need some urgent help on a requirment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to display Cust_Nos that meet only this criteria in a list box or any other kind of object. The criteria is that I want to show only customer numbers that have the sum of expense value of 1 greater than the sum of&amp;nbsp; expense value of 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have entered this into the expression in a list box&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(sum({&amp;lt;[Expense] = {'1'}&amp;gt;} Value * -1) &amp;gt; sum({&amp;lt;[Expense] = {'2'}&amp;gt;} Value), [Cust_No]) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿I get a list box with all customer numbers and then a new column with these customer numbers that meet my criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only want my list box to show the customer numbers that meet my criteria and nothing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 11:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289801#M585313</guid>
      <dc:creator />
      <dc:date>2011-08-22T11:15:15Z</dc:date>
    </item>
    <item>
      <title>Condition in a List Box</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289802#M585314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you entered above in tab expression of a list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to limit your field values, I think you need to use the expression in field selection in tab general.&lt;/P&gt;&lt;P&gt;Go to tab general, open drop down list "Field" and at the very end, there you can select &amp;lt;Expression&amp;gt; and enter any expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 11:40:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289802#M585314</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-22T11:40:51Z</dc:date>
    </item>
    <item>
      <title>Condition in a List Box</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289803#M585315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I enter my expression ﻿in the General tab --- &amp;gt; Field ---&amp;gt; Expression, the list box does not does not display anything and just comes up with a blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 12:00:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289803#M585315</guid>
      <dc:creator />
      <dc:date>2011-08-22T12:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Condition in a List Box</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289804#M585316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to get the actual values, so what about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, you build the list of values that match with the condition of the sum (use a text object to check it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Chr(39) &amp;amp; Concat(Aggr(Sum({&amp;lt; [Expense] = {'1'} &amp;gt;} Value * -1) &amp;gt; Sum({&amp;lt; [Expense] = {'2'} &amp;gt;} Value), [Cust_No]), Chr(39) &amp;amp; Chr(44) &amp;amp; Chr(39))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chr(39) and Chr(44) are needed if you expect strings, in order to get them properly quoted: 'A','B','C'...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, if the field value matches the above, then show the value, otherwise, don't show anything &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=If(Match([Cust_No], $(=Chr(39) &amp;amp; Concat(Aggr(Sum({&amp;lt; [Expense] = {'1'} &amp;gt;} Value * -1) &amp;gt; Sum({&amp;lt; [Expense] = {'2'} &amp;gt;} Value), [Cust_No]), Chr(39) &amp;amp; Chr(44) &amp;amp; Chr(39)) &amp;amp; Chr(39))) &amp;gt; 0, [Cust_No])&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Aggr() stuff is needed to get one result per value, and the Match() compares the actual value with the possible values that match your criteria. Now yo do have a list of values that fit one condition, and they will be shown in your listbox as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't checked the parentheses, so there might be some bugs in the expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 12:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289804#M585316</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-22T12:21:18Z</dc:date>
    </item>
    <item>
      <title>Condition in a List Box</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289805#M585317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this should work also as calculated expression in the field expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(sum({&amp;lt;[Expense] = {'1'}&amp;gt;} Value * -1),[Cust_No]) &amp;gt; aggr(sum({&amp;lt;[Expense] = {'2'}&amp;gt;} Value),[Cust_No]), [Cust_No])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 12:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289805#M585317</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-22T12:28:53Z</dc:date>
    </item>
    <item>
      <title>Condition in a List Box</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289806#M585318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot guys, both answers are actually correct. I am very grateful and happy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 12:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-in-a-List-Box/m-p/289806#M585318</guid>
      <dc:creator />
      <dc:date>2011-08-22T12:51:10Z</dc:date>
    </item>
  </channel>
</rss>

