<?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 Constant Variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1651457#M456100</link>
    <description>&lt;P&gt;I have a data set similar to the one below but much more complex.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample Data Set 2.JPG" style="width: 597px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24442iF37850168225BF9B/image-dimensions/597x400?v=v2" width="597" height="400" role="button" title="Sample Data Set 2.JPG" alt="Sample Data Set 2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to show a chart similar to what is shown but have a list box where i select the product and see only plants that make that product.&amp;nbsp; So if I select 'product D' I only see Plants 2 &amp;amp; 4.&amp;nbsp; That I can do but I would also like to see the Open Cap at each of those plants in addition.&amp;nbsp; When i select the product i want the open cap does not get shown.&amp;nbsp; Ideally I would see all product at those plants but Open Cap is the one i need for sure.&amp;nbsp; Essentially i want to use product name to narrow plants shown but show all products at those plants.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 14:40:01 GMT</pubDate>
    <dc:creator>EGilbert</dc:creator>
    <dc:date>2019-11-26T14:40:01Z</dc:date>
    <item>
      <title>Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1651457#M456100</link>
      <description>&lt;P&gt;I have a data set similar to the one below but much more complex.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample Data Set 2.JPG" style="width: 597px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24442iF37850168225BF9B/image-dimensions/597x400?v=v2" width="597" height="400" role="button" title="Sample Data Set 2.JPG" alt="Sample Data Set 2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to show a chart similar to what is shown but have a list box where i select the product and see only plants that make that product.&amp;nbsp; So if I select 'product D' I only see Plants 2 &amp;amp; 4.&amp;nbsp; That I can do but I would also like to see the Open Cap at each of those plants in addition.&amp;nbsp; When i select the product i want the open cap does not get shown.&amp;nbsp; Ideally I would see all product at those plants but Open Cap is the one i need for sure.&amp;nbsp; Essentially i want to use product name to narrow plants shown but show all products at those plants.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 14:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1651457#M456100</guid>
      <dc:creator>EGilbert</dc:creator>
      <dc:date>2019-11-26T14:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1652810#M456101</link>
      <description>&lt;P&gt;If your expression previously was "sum(Amount)", you could change it to "sum({&amp;lt;Product-={'Open Cap'}&amp;gt;} Amount) + if(sum(Amount)&amp;gt;0, sum({&lt;STRONG&gt;1&lt;/STRONG&gt;&amp;lt;Product={'Open Cap'}&amp;gt;})"&lt;/P&gt;&lt;P&gt;The first half of the expression sums up all values for all products except Open Cap. The second half ignores your selection of a specific product, and adds in the value of the Open Cap product at that Plant. The if statement is required so you aren't displaying Open Cap for the Plants that do not make the selected product.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 23:56:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1652810#M456101</guid>
      <dc:creator>gavinlaird</dc:creator>
      <dc:date>2019-11-29T23:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1653210#M456102</link>
      <description>&lt;P&gt;&lt;EM&gt;Thanks for the help.&amp;nbsp; I cannot get the formula you provided to work.&amp;nbsp; I add the first part to a simple sum expression and I see basically what I want but to your point I see every plant whether&amp;nbsp; they provide the chosen product/architecture I select in my list.&amp;nbsp; I cannot get your 'if' statement to work but when I modify it I either get nothing or just the selected demand.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Here is what I have to get all plants open and applicable plants selected architectures&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;DISTINCT&lt;/FONT&gt; &lt;FONT size="1" color="#800000"&gt;[Demand A]&lt;/FONT&gt;&lt;FONT size="1"&gt;)+&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;Sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({&amp;lt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Architecture A]&lt;/FONT&gt;&lt;FONT size="1"&gt;={'Open'}&amp;gt;} &lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Demand A]&lt;/FONT&gt;&lt;FONT size="1"&gt;) &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thanks Again&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 15:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1653210#M456102</guid>
      <dc:creator>EGilbert</dc:creator>
      <dc:date>2019-12-02T15:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1653709#M456103</link>
      <description>&lt;P&gt;Let me ask this a different way.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample Data Set 2.JPG" style="width: 522px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24845i319F7154F41CCB71/image-dimensions/522x350?v=v2" width="522" height="350" role="button" title="Sample Data Set 2.JPG" alt="Sample Data Set 2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the above example how would I use a listbox to select the product ID and have the chart show just the plants that make that product, but show the whole plant look so all products and open capacity.&amp;nbsp; In essence use the product ID in the listbox as a filter for what plant dimension values to display, but not impact the product detail data in the sum expression?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 17:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1653709#M456103</guid>
      <dc:creator>EGilbert</dc:creator>
      <dc:date>2019-12-03T17:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654683#M456104</link>
      <description>&lt;P&gt;You need the 1 in the set analysis of the second statement to make it ignore the user's selection:&lt;/P&gt;&lt;P&gt;&lt;FONT size="1" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;DISTINCT&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="1" color="#800000"&gt;[Demand A]&lt;/FONT&gt;&lt;FONT size="1"&gt;)+&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;Sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({&lt;FONT size="4"&gt;1&lt;/FONT&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Architecture A]&lt;/FONT&gt;&lt;FONT size="1"&gt;={'Open'}&amp;gt;}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Demand A]&lt;/FONT&gt;&lt;FONT size="1"&gt;)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 16:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654683#M456104</guid>
      <dc:creator>gavinlaird</dc:creator>
      <dc:date>2019-12-05T16:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654687#M456105</link>
      <description>&lt;P&gt;Thanks for the response.&amp;nbsp; I added the 1 and the open bars do show up, but it also adds the open for every plant, not just those where the&amp;nbsp;architecture selected in the list box are produced?&amp;nbsp; That is key to make the chart usable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 16:54:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654687#M456105</guid>
      <dc:creator>EGilbert</dc:creator>
      <dc:date>2019-12-05T16:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654807#M456106</link>
      <description>&lt;P&gt;Sorry! Please try the expression below, which now checks if the plant produces the selected architecture before adding the open cap.&lt;/P&gt;&lt;P&gt;&lt;FONT size="1" color="#0000ff"&gt;sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({&amp;lt;&lt;FONT size="1" color="#800000"&gt;[Architecture A]-&lt;/FONT&gt;={'Open'}&amp;gt;}&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;DISTINCT&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="1" color="#800000"&gt;[Demand A]&lt;/FONT&gt;&lt;FONT size="1"&gt;)+&lt;EM&gt;if(&lt;FONT size="1" color="#0000ff"&gt;sum&lt;/FONT&gt;(&lt;FONT size="1" color="#0000ff"&gt;DISTINCT&lt;/FONT&gt;&amp;nbsp;&lt;FONT size="1" color="#800000"&gt;[Demand A]&lt;/FONT&gt;)&amp;gt;0,&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT size="1" color="#0000ff"&gt;Sum&lt;/FONT&gt;&lt;FONT size="1"&gt;({1&amp;lt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Architecture A]&lt;/FONT&gt;&lt;FONT size="1"&gt;={'Open'}&amp;gt;}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT size="1" color="#800000"&gt;[Demand A]&lt;/FONT&gt;&lt;FONT size="1"&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Also, make sure you include&amp;nbsp;&lt;FONT size="1" color="#800000"&gt;[Architecture A]-&lt;/FONT&gt;&lt;FONT size="1"&gt;={'Open'}&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;in the first part of the expression, so you don't count the open cap twice.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 23:52:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654807#M456106</guid>
      <dc:creator>gavinlaird</dc:creator>
      <dc:date>2019-12-05T23:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654823#M456107</link>
      <description>&lt;P&gt;Whatever expressions you are using to create the bars should include the set:&lt;/P&gt;&lt;P&gt;{PlantId=P(ProductId), ProductId=}&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 02:28:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1654823#M456107</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-12-06T02:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Constant Variables</title>
      <link>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1655686#M456108</link>
      <description>&lt;P&gt;Did either of the last two posts get you what you needed?&amp;nbsp; If so, do not forget to return to the thread and use the Accept as Solution button on the post(s) that helped you get things working as you wanted.&amp;nbsp; This gives credit to the poster(s) for the assistance and tells other Community Members what worked, so please be sure you return to do this step.&amp;nbsp; If you are still working on things, leave an update.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 22:11:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Constant-Variables/m-p/1655686#M456108</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-09T22:11:48Z</dc:date>
    </item>
  </channel>
</rss>

