<?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 advanced search: multiple or selection in different fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/advanced-search-multiple-or-selection-in-different-fields/m-p/166987#M38727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, totally clear for me now.. I will use this solution with some inputboxes and variables to make it more flexible and user friendly. Thanks Martijn!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2009 18:06:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-26T18:06:47Z</dc:date>
    <item>
      <title>advanced search: multiple or selection in different fields</title>
      <link>https://community.qlik.com/t5/QlikView/advanced-search-multiple-or-selection-in-different-fields/m-p/166985#M38725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to do an advanced search with an or selection in different fields.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;I need to select all values in the field product with wine in it but I also want to select all values in the field substance with alcohol in it but I don't want to exclude values because of the relation between them (in other words I can't use and).&lt;/P&gt;&lt;P&gt;In product is a wine without alcohol and I don't want my search to exclude this wine because of my search in the field substance for alcohol. (hope I make myself clear ;-)) .. Thing is I don't want to affect the searches in the different fields on eachother. Sounds like I need to use or...&lt;/P&gt;&lt;P&gt;advanced search in a listbox&lt;/P&gt;&lt;P&gt;= product like 'wine' or substance like '*alcohol*'&lt;/P&gt;&lt;P&gt;Only thing is, when I do this, I get different selections depending on the listbox where I do the advanced search. In my opinion it shouldn't matter on which listbox I do the advanced search because I'm defining the fields in the advanced search (bcs of defining these fields in the advanced search it should be possible to do the search in the listbox age for example)..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 17:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/advanced-search-multiple-or-selection-in-different-fields/m-p/166985#M38725</guid>
      <dc:creator />
      <dc:date>2009-08-26T17:18:39Z</dc:date>
    </item>
    <item>
      <title>advanced search: multiple or selection in different fields</title>
      <link>https://community.qlik.com/t5/QlikView/advanced-search-multiple-or-selection-in-different-fields/m-p/166986#M38726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi William,&lt;/P&gt;&lt;P&gt;I'd guess that this is dependent on how values in the field (listbox) you're searching on are linked to other fields, including the 'product' and 'substance' fields, and the field(s) you're using in expressions.&lt;/P&gt;&lt;P&gt;One way this can go wrong is with a table that contains (among others) the following records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;[country, product, substance, sales]&lt;BR /&gt;France, wine, alcohol, 14000&lt;BR /&gt;France, cognac, alcohol, 7000&lt;BR /&gt;France, wine, water+artificial flavour, 1200&lt;BR /&gt;France, fat-free milk, milk, 20000&lt;BR /&gt;Belgium, mineral water, water, 10000&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you select on the 'country' listbox using an expression "=product like 'wine' or substance like '*alcohol*'", the expression will select every 'country' value that's linked to either a product value 'wine' or a substance value containing 'alcohol'. What happens is that the 'country' value 'France' is selected, and therefore &lt;B&gt;everything&lt;/B&gt; in the cloud that's linked to 'France' is selected; this includes the values from the record 'France, fat-free milk, milk, 20000' because they're linked to the 'France' value which you selected.&lt;/P&gt;&lt;P&gt;If you're trying to calculate some expression for only the product 'wine' or any products containing substance 'alcohol', you should try using set analysis in your expression. In the example case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({1&amp;lt;product={wine}&amp;gt; + 1&amp;lt;substance={"*alcohol*"}&amp;gt;} sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(which is: sum of sales for everything linked to product 'wine' or linked to some substance containing 'alcohol').&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Martijn ter Schegget&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 17:36:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/advanced-search-multiple-or-selection-in-different-fields/m-p/166986#M38726</guid>
      <dc:creator />
      <dc:date>2009-08-26T17:36:02Z</dc:date>
    </item>
    <item>
      <title>advanced search: multiple or selection in different fields</title>
      <link>https://community.qlik.com/t5/QlikView/advanced-search-multiple-or-selection-in-different-fields/m-p/166987#M38727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, totally clear for me now.. I will use this solution with some inputboxes and variables to make it more flexible and user friendly. Thanks Martijn!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 18:06:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/advanced-search-multiple-or-selection-in-different-fields/m-p/166987#M38727</guid>
      <dc:creator />
      <dc:date>2009-08-26T18:06:47Z</dc:date>
    </item>
  </channel>
</rss>

