<?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 Re: defining a list variable according to selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/defining-a-list-variable-according-to-selection/m-p/1540309#M744858</link>
    <description>&lt;P&gt;I'm not sure if I understand your task but I think I wouldn't try your described approach else I would try to match everything within the datamodel so that I could use "normal" selections and expressions. In your case with multiple categories per product might an as-of table be useful: &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The-As-Of-Table&lt;/A&gt; to define such a relation.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Wed, 06 Feb 2019 14:04:15 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2019-02-06T14:04:15Z</dc:date>
    <item>
      <title>defining a list variable according to selection</title>
      <link>https://community.qlik.com/t5/QlikView/defining-a-list-variable-according-to-selection/m-p/1540104#M744857</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I have a qvd file with a variable "Type" which has numerical values from 5000 to 7000.&lt;/P&gt;&lt;P&gt;These values can be categorized to products: A, B , C - but a value can be categorized to more than on product. For instance, values 5201 is also in&amp;nbsp;product A and also in&amp;nbsp;B.&lt;/P&gt;&lt;P&gt;my App has a selection for the type of products you're interested in viewing. I want to show the viewer the number of observations which are relevant to the selected product. I want to do the following steps (unless you can think of a more efficient way!)&amp;nbsp;but need help with syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;a. create a&amp;nbsp;list variable for each product and in it put all the relevant "type" numbers. for example:&lt;/P&gt;&lt;P&gt;set vProductA = 5501,5201;&lt;/P&gt;&lt;P&gt;b. create a list variable for each product which receives&amp;nbsp;the&amp;nbsp;value of&amp;nbsp;&amp;nbsp;the list variable if that product is chosen, and an &lt;STRONG&gt;&lt;U&gt;empty list set&amp;nbsp;&lt;/U&gt; &lt;/STRONG&gt;otherwise. for example:&lt;/P&gt;&lt;P&gt;if((wildmatch(GetFieldSelections(product,';','*A*')))&amp;gt;&amp;nbsp;0, vProductAchoose=$(&amp;nbsp;vProductA&amp;nbsp;),vProductAchoose={})&lt;/P&gt;&lt;P&gt;c. create a variable which is a join of step b variables:&lt;/P&gt;&lt;P&gt;set vProductChosen =sum({&amp;lt;vProductAchoose&amp;gt;+&amp;lt;vProductBchoose&amp;gt;+&amp;lt;vProductCchoose&amp;gt;})&lt;/P&gt;&lt;P&gt;d. count all observations in this&amp;nbsp;new list:&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Type={"vProductChosen"}&amp;gt;}&amp;nbsp;observation)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the correct syntax for steps b-d?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thankyou!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/defining-a-list-variable-according-to-selection/m-p/1540104#M744857</guid>
      <dc:creator>michal_l</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: defining a list variable according to selection</title>
      <link>https://community.qlik.com/t5/QlikView/defining-a-list-variable-according-to-selection/m-p/1540309#M744858</link>
      <description>&lt;P&gt;I'm not sure if I understand your task but I think I wouldn't try your described approach else I would try to match everything within the datamodel so that I could use "normal" selections and expressions. In your case with multiple categories per product might an as-of table be useful: &lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The-As-Of-Table&lt;/A&gt; to define such a relation.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/defining-a-list-variable-according-to-selection/m-p/1540309#M744858</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-02-06T14:04:15Z</dc:date>
    </item>
  </channel>
</rss>

