<?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: how to restrict an stock variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413859#M153956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could just select 1 in the field contact_Activity. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to change the z_bestand expression and only want to add contact_Activity={'1'} then change&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: gray;"&gt;z_bestand&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: #ffffff; font-size: 9pt; color: black; font-family: 'Courier New';"&gt;='count({$&amp;lt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;into&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: gray;"&gt;z_bestand&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: #ffffff; font-size: 9pt; color: black; font-family: 'Courier New';"&gt;='count({$&amp;lt;contact_Activity={1},';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selections in fields that don't begin with transaction_ are used for calculating the z_bestand expression, so you can restrict values in these fields by making selections in them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Jan 2013 18:16:35 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-01-12T18:16:35Z</dc:date>
    <item>
      <title>how to restrict a variable</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413858#M153955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi&lt;/DIV&gt;&lt;DIV&gt;sorry for this question, but i need help on this&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;i have a variable&amp;nbsp; "z_bestand", which was generated in the script. Now i need to create a variable using the User Interface (Variable List)&lt;/DIV&gt;&lt;DIV&gt;i want to restrict the "z-bestand" (total number of customers) to have only customers that bought something. (field: contact_activity = '1' = active, '0' = inactive). This is i want to take only the contact_activity = '1'. I tried with set analysis, but i cannot use an aggregation function because the "z-bestand" is already a stock variable (i.e., a total number).&amp;nbsp; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 12pt;"&gt;num ({$&amp;lt;contact_Activity={'1'}&amp;gt;}{&lt;SPAN style="color: #808080;"&gt;&lt;STRONG style="color: #808080;"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;$(z-bestand)}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #808080; font-size: 12pt;"&gt;&lt;STRONG&gt;is there other way to restrict the variable in the user interface variable list? is it possible to use if-statements in the variable list window?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;if i restrict in the script, how shall i call the variable "z_bestand" restricting it to take only the "active customers". as it was also created in the last script tab, it may probably will not read the variable &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;many thanks&lt;/DIV&gt;&lt;DIV&gt;felipe&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: mceinline;"&gt;&lt;SPAN style="font-family: mceinline; font-style: font-family;"&gt;&lt;DIV&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New';"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: green; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 1;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 08:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413858#M153955</guid>
      <dc:creator>felcar2013</dc:creator>
      <dc:date>2013-01-11T08:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to restrict an stock variable</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413859#M153956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could just select 1 in the field contact_Activity. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to change the z_bestand expression and only want to add contact_Activity={'1'} then change&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: gray;"&gt;z_bestand&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: #ffffff; font-size: 9pt; color: black; font-family: 'Courier New';"&gt;='count({$&amp;lt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;into&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12px; color: #000000; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; color: gray;"&gt;z_bestand&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="background-color: #ffffff; font-size: 9pt; color: black; font-family: 'Courier New';"&gt;='count({$&amp;lt;contact_Activity={1},';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selections in fields that don't begin with transaction_ are used for calculating the z_bestand expression, so you can restrict values in these fields by making selections in them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2013 18:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413859#M153956</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-01-12T18:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to restrict an stock variable</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413860#M153957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;contact_Activity is a hidden field. I changed it to %contact_Activity_ID and set the Prefix '%', so that it does not appear in the final result of "z_bestand"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not possible to fix the z_bestand with " {$&amp;lt;contact_Activity={1}&amp;gt;}" in the formula. &lt;/P&gt;&lt;P&gt;do you know another way to manipulate the variable?&lt;/P&gt;&lt;P&gt;felipe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 18:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413860#M153957</guid>
      <dc:creator>felcar2013</dc:creator>
      <dc:date>2013-01-14T18:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to restrict an stock variable</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413861#M153958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your first recommendation worked well&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;&lt;P&gt;felipe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 09:46:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413861#M153958</guid>
      <dc:creator>felcar2013</dc:creator>
      <dc:date>2013-01-16T09:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to restrict an stock variable</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413862#M153959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry that i disturb you again, i have this concrete case for active members,&amp;nbsp; i also need to do the same for other cases, for ex. where gender= male or female or unknown or other or where i have to restrict to a condition.&lt;/P&gt;&lt;P&gt;what would you recommend here? lets assume&amp;nbsp; have to create 20 such cases (variables?)&lt;/P&gt;&lt;P&gt;thanks again!&lt;/P&gt;&lt;P&gt;felipe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 10:36:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-restrict-a-variable/m-p/413862#M153959</guid>
      <dc:creator>felcar2013</dc:creator>
      <dc:date>2013-01-16T10:36:03Z</dc:date>
    </item>
  </channel>
</rss>

