<?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 Select by multiple dimension values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Select-by-multiple-dimension-values/m-p/1395740#M32285</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;I'm trying to create a selection where there's an "AND" and not "OR" between the values. I will try to explain with an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the table&amp;nbsp; below I have 3 outcomes of Dim1, A, B and C. I want to be able to create a selection of Dim1 by choosing values in Dim2. If I choose X, I will be shown Dim1 = A, B, C. If I choose X and Y I will only be shown A and C, since B don't have both X and Y. If I chose X, Y and Z I will only be shown C, since neither A or B have all 3 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="left" class="xl70" height="20" width="64"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Dim1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="left" class="xl71" width="64"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Dim2&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl64" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD align="left" class="xl65" style="border-top: none;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl68" height="20"&gt;A&lt;/TD&gt;&lt;TD align="left" class="xl69"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl64" height="20"&gt;B&lt;/TD&gt;&lt;TD align="left" class="xl65"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl66" height="20"&gt;B&lt;/TD&gt;&lt;TD align="left" class="xl67"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl64" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD align="left" class="xl65" style="border-top: none;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl68" height="20"&gt;C&lt;/TD&gt;&lt;TD align="left" class="xl69"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl66" height="20"&gt;C&lt;/TD&gt;&lt;TD align="left" class="xl67"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a simple example. I have a Dim1 with 1.000 diferent values and a Dim2 with 20.000 different values, where usually 5-10 exist for each Dim1. That means transposing Dim2 wont be an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to make a Dim1 selection using a filterpane based on Dim2 values with a "AND" criteria? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Oct 2017 10:39:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-19T10:39:28Z</dc:date>
    <item>
      <title>Select by multiple dimension values</title>
      <link>https://community.qlik.com/t5/App-Development/Select-by-multiple-dimension-values/m-p/1395740#M32285</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;I'm trying to create a selection where there's an "AND" and not "OR" between the values. I will try to explain with an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the table&amp;nbsp; below I have 3 outcomes of Dim1, A, B and C. I want to be able to create a selection of Dim1 by choosing values in Dim2. If I choose X, I will be shown Dim1 = A, B, C. If I choose X and Y I will only be shown A and C, since B don't have both X and Y. If I chose X, Y and Z I will only be shown C, since neither A or B have all 3 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="left" class="xl70" height="20" width="64"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Dim1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="left" class="xl71" width="64"&gt;&lt;STRONG style="text-decoration: underline;"&gt;Dim2&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl64" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD align="left" class="xl65" style="border-top: none;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl68" height="20"&gt;A&lt;/TD&gt;&lt;TD align="left" class="xl69"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl64" height="20"&gt;B&lt;/TD&gt;&lt;TD align="left" class="xl65"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl66" height="20"&gt;B&lt;/TD&gt;&lt;TD align="left" class="xl67"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl64" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD align="left" class="xl65" style="border-top: none;"&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl68" height="20"&gt;C&lt;/TD&gt;&lt;TD align="left" class="xl69"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" class="xl66" height="20"&gt;C&lt;/TD&gt;&lt;TD align="left" class="xl67"&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a simple example. I have a Dim1 with 1.000 diferent values and a Dim2 with 20.000 different values, where usually 5-10 exist for each Dim1. That means transposing Dim2 wont be an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to make a Dim1 selection using a filterpane based on Dim2 values with a "AND" criteria? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 10:39:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Select-by-multiple-dimension-values/m-p/1395740#M32285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-19T10:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select by multiple dimension values</title>
      <link>https://community.qlik.com/t5/App-Development/Select-by-multiple-dimension-values/m-p/1395741#M32286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Theis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Took me a while, but to do that, you'll need to do a dynamic set analysis, since you have to address multiple set intersections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code generates a dynamic intersection set analysis, based on the selections made on Dim2 field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Inline table&lt;/P&gt;&lt;P&gt;x:&lt;/P&gt;&lt;P&gt;load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Dim1, Dim2&lt;/P&gt;&lt;P&gt;A, X&lt;/P&gt;&lt;P&gt;A, Y&lt;/P&gt;&lt;P&gt;B, X&lt;/P&gt;&lt;P&gt;B, Z&lt;/P&gt;&lt;P&gt;C ,X&lt;/P&gt;&lt;P&gt;C ,Y&lt;/P&gt;&lt;P&gt;C ,Z&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Ordering the table by Dim2&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Resident x&lt;/P&gt;&lt;P&gt;order by Dim2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Getting distinct Dim2 values&lt;/P&gt;&lt;P&gt;teste:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Distinct Dim2&lt;/P&gt;&lt;P&gt;Resident data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Creating an index so that it is possible to check which values must be displayed&lt;/P&gt;&lt;P&gt;Index:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Dim2,&lt;/P&gt;&lt;P&gt;RecNo() as Index,&lt;/P&gt;&lt;P&gt;Dim2 as OrderDim2&lt;/P&gt;&lt;P&gt;Resident teste&lt;/P&gt;&lt;P&gt;order by Dim2 asc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop tables teste,x;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// simple counter&lt;/P&gt;&lt;P&gt;let i = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// for each value of Dim2 field, create individual set analysis and multiplication (intersection) value *&lt;/P&gt;&lt;P&gt;for each Value in FieldValueList('OrderDim2')&lt;/P&gt;&lt;P&gt;let teste = Lookup('Index','Dim2','$(Value)','Index');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set vSetPart$(i) = if(index(concat(Index,','),'$(teste)'),'&amp;lt;Dim1=P({&amp;lt;Dim2={"$(Value)"}&amp;gt;}Dim1)&amp;gt;','');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set vTest$(i) = '';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set x$(i) = '=$(vSetPart$(i))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set asterisk$(i) = =if(index(concat(Index,','),'$(teste)') and GetPossibleCount(Index)&amp;gt;1 and MaxString(Index)&amp;lt;&amp;gt;'$(teste)','*','');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i = i+1;&lt;/P&gt;&lt;P&gt;next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code gives me the following:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sample.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180369_Sample.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached a sample QVW for your testing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was quite challeging and fun to do &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Select-by-multiple-dimension-values/m-p/1395741#M32286</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2017-10-20T13:31:40Z</dc:date>
    </item>
  </channel>
</rss>

