<?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 Help with a list box expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296345#M109909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having trouble with getting a list box expression to filter the way I'd like it to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I have is pasted below.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Field1= 'Yes' and Field2 = 'Yes','Yes','No') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field1 and Field2 can either have a value of Yes or No.&amp;nbsp; If Yes is selected in the list box, I only want records that have a value of "Yes" for both Field1 and Field2 to display.&amp;nbsp; If either or both Field1 or Field2 have a value of No, I only want the record to display when the list box has "No" selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This chart shows what I'm looking for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Field1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Field2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Should Display when&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;List Box is equal to Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;List Box is equal to No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;List Box is equal to No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;No &lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;List Box is equal to No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2011 20:45:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-16T20:45:21Z</dc:date>
    <item>
      <title>Help with a list box expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296345#M109909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having trouble with getting a list box expression to filter the way I'd like it to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I have is pasted below.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Field1= 'Yes' and Field2 = 'Yes','Yes','No') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field1 and Field2 can either have a value of Yes or No.&amp;nbsp; If Yes is selected in the list box, I only want records that have a value of "Yes" for both Field1 and Field2 to display.&amp;nbsp; If either or both Field1 or Field2 have a value of No, I only want the record to display when the list box has "No" selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This chart shows what I'm looking for. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Field1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Field2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Should Display when&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;List Box is equal to Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;List Box is equal to No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;List Box is equal to No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;No &lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;List Box is equal to No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 20:45:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296345#M109909</guid>
      <dc:creator />
      <dc:date>2011-06-16T20:45:21Z</dc:date>
    </item>
    <item>
      <title>Help with a list box expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296346#M109910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't have time to test it right now, but my guess is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( listbox = 'Yes',&lt;/P&gt;&lt;P&gt; Sum( {$&amp;lt;Field1={Yes},Field2={Yes}&amp;gt;} somenumber),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Both fields yes&lt;/P&gt;&lt;P&gt; Sum( {($&amp;lt;Field1={No}&amp;gt;)+($&amp;lt;Field2={No}&amp;gt;)} somenumber)&amp;nbsp; // + unions selection of Field1=no and Field2=no&lt;/P&gt;&lt;P&gt; ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this points you in the right direction,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeroen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 21:09:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296346#M109910</guid>
      <dc:creator />
      <dc:date>2011-06-16T21:09:21Z</dc:date>
    </item>
    <item>
      <title>Help with a list box expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296347#M109911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&amp;nbsp; For the listbox = "Yes" part, how do I reference my listbox?&amp;nbsp; Do I need to reference it by the name?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 13:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296347#M109911</guid>
      <dc:creator />
      <dc:date>2011-06-17T13:47:05Z</dc:date>
    </item>
    <item>
      <title>Help with a list box expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296348#M109912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given that NO is the controlling element of the expression, I would have thought that the formula logic should be better written thus:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If field 1 is no then put no, if field 2 is no put no otherwise put yes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([field1] = 'No', 'No', if([Field2] = 'No','No', 'Yes'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 13:57:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296348#M109912</guid>
      <dc:creator />
      <dc:date>2011-06-17T13:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a list box expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296349#M109913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Well you could create a seperate field for that: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LISTBOX: &lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;listbox &lt;/P&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;P&gt;No]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That way it isnt hardwired to the attributes. And then place a Select field on "listbox" on your sheet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 13:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296349#M109913</guid>
      <dc:creator />
      <dc:date>2011-06-17T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Help with a list box expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296350#M109914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I try using the Listbox field with the separate field, it doesn't filter the report at all, regardless of whether I pick yes or no.&amp;nbsp; Do I somehow need to tie this new field to anything besides the listbox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your responses; I really appreciate your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 16:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296350#M109914</guid>
      <dc:creator />
      <dc:date>2011-06-17T16:07:00Z</dc:date>
    </item>
    <item>
      <title>Help with a list box expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296351#M109915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up figuring it out, so you can disregard my last question.&amp;nbsp; Thank you for your direction!&amp;nbsp; I used the getFieldSelections() function to determine whether Yes or No was selected, and then used that to filter my chart correctly based on the values in Field1 and Field2.&amp;nbsp; Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 20:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-a-list-box-expression/m-p/296351#M109915</guid>
      <dc:creator />
      <dc:date>2011-06-17T20:19:20Z</dc:date>
    </item>
  </channel>
</rss>

