<?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 Solution for filtering data by using AND + OR at the same time in Qlik Sense 3.2 in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Solution-for-filtering-data-by-using-AND-OR-at-the-same-time-in/m-p/1326679#M28823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a long time we where looking for a fast solution to filter data.&lt;/P&gt;&lt;P&gt;We needed something like:&lt;/P&gt;&lt;P&gt;Filter1 + [Option1a]+[Option1b]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR&amp;nbsp; Filter2 + [Option2a]+[Option2b]&amp;nbsp; OR&amp;nbsp; Filter3 + [Option3a]+[Option3b]&amp;nbsp;&amp;nbsp; …….&lt;/P&gt;&lt;P&gt;Filter-n is always mandatory.&lt;/P&gt;&lt;P&gt;Option-na&amp;nbsp; and Option-nb is optional.&lt;/P&gt;&lt;P&gt;So we use AND + OR at the same time.&lt;/P&gt;&lt;P&gt;The Qlik support told us it would not be possible without extensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A solution via IF is working but the integration of 3 columns is very slow.&lt;/P&gt;&lt;P&gt;So we are now using “set analysis”.&lt;/P&gt;&lt;P&gt;The solution has 4 columns with 3 filters per column. With 2.3 million dataset-rows the result appears within a second.&lt;/P&gt;&lt;P&gt;There is a trick to split the OR from the AND. &lt;/P&gt;&lt;P&gt;The OR’s are integrated in the frontend. The AND’s are realized in 8 variables.&lt;/P&gt;&lt;P&gt;The column is:&lt;/P&gt;&lt;P&gt;=Count({$(VARTAB1)&amp;nbsp; + $(VARTAB2)&amp;nbsp;&amp;nbsp; +&amp;nbsp;&amp;nbsp; $(VARTAB3) +&amp;nbsp;&amp;nbsp; $(VARTAB4)&amp;nbsp; } Customer) &lt;/P&gt;&lt;P&gt;One variable looks like &lt;/P&gt;&lt;P&gt;VARTAB1:&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; &amp;lt; Car1={'$(=getfieldselections(CarFilter1))'}&amp;nbsp; , Color1={$(=if(getselectedcount(ColorFilter1)&amp;gt;0,getfieldselections(ColorFilter1),'*'))}&amp;nbsp; , Year1={$(=if(getselectedcount(YearFilter1)&amp;gt;0,getfieldselections(YearFilter1),'*'))}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For better understanding look the example app and use the bookmark or your own selections.&lt;/P&gt;&lt;P&gt;Have a lot of fun &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: be careful&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “/” is not allowed in the colors or years&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cars.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/172025_Cars.JPG" style="height: 460px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Aug 2017 09:37:29 GMT</pubDate>
    <dc:creator>bernhard_koehle</dc:creator>
    <dc:date>2017-08-01T09:37:29Z</dc:date>
    <item>
      <title>Solution for filtering data by using AND + OR at the same time in Qlik Sense 3.2</title>
      <link>https://community.qlik.com/t5/App-Development/Solution-for-filtering-data-by-using-AND-OR-at-the-same-time-in/m-p/1326679#M28823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a long time we where looking for a fast solution to filter data.&lt;/P&gt;&lt;P&gt;We needed something like:&lt;/P&gt;&lt;P&gt;Filter1 + [Option1a]+[Option1b]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR&amp;nbsp; Filter2 + [Option2a]+[Option2b]&amp;nbsp; OR&amp;nbsp; Filter3 + [Option3a]+[Option3b]&amp;nbsp;&amp;nbsp; …….&lt;/P&gt;&lt;P&gt;Filter-n is always mandatory.&lt;/P&gt;&lt;P&gt;Option-na&amp;nbsp; and Option-nb is optional.&lt;/P&gt;&lt;P&gt;So we use AND + OR at the same time.&lt;/P&gt;&lt;P&gt;The Qlik support told us it would not be possible without extensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A solution via IF is working but the integration of 3 columns is very slow.&lt;/P&gt;&lt;P&gt;So we are now using “set analysis”.&lt;/P&gt;&lt;P&gt;The solution has 4 columns with 3 filters per column. With 2.3 million dataset-rows the result appears within a second.&lt;/P&gt;&lt;P&gt;There is a trick to split the OR from the AND. &lt;/P&gt;&lt;P&gt;The OR’s are integrated in the frontend. The AND’s are realized in 8 variables.&lt;/P&gt;&lt;P&gt;The column is:&lt;/P&gt;&lt;P&gt;=Count({$(VARTAB1)&amp;nbsp; + $(VARTAB2)&amp;nbsp;&amp;nbsp; +&amp;nbsp;&amp;nbsp; $(VARTAB3) +&amp;nbsp;&amp;nbsp; $(VARTAB4)&amp;nbsp; } Customer) &lt;/P&gt;&lt;P&gt;One variable looks like &lt;/P&gt;&lt;P&gt;VARTAB1:&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; &amp;lt; Car1={'$(=getfieldselections(CarFilter1))'}&amp;nbsp; , Color1={$(=if(getselectedcount(ColorFilter1)&amp;gt;0,getfieldselections(ColorFilter1),'*'))}&amp;nbsp; , Year1={$(=if(getselectedcount(YearFilter1)&amp;gt;0,getfieldselections(YearFilter1),'*'))}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For better understanding look the example app and use the bookmark or your own selections.&lt;/P&gt;&lt;P&gt;Have a lot of fun &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: be careful&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “/” is not allowed in the colors or years&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cars.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/172025_Cars.JPG" style="height: 460px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 09:37:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Solution-for-filtering-data-by-using-AND-OR-at-the-same-time-in/m-p/1326679#M28823</guid>
      <dc:creator>bernhard_koehle</dc:creator>
      <dc:date>2017-08-01T09:37:29Z</dc:date>
    </item>
  </channel>
</rss>

