<?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: Calculated Dimension that Uses Complete Set in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60708#M10088</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may try something like this - &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1431244"&gt;What does it mean sum({1} 0)?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Feb 2018 22:21:32 GMT</pubDate>
    <dc:creator>Digvijay_Singh</dc:creator>
    <dc:date>2018-02-21T22:21:32Z</dc:date>
    <item>
      <title>Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60704#M10084</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 have a situation where I am trying to restrict the Dimensions in a straight table, and preferably by not restricting them via the expressions since these are quite complicated and involve a number of other dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To better explain I will try and simplify my question this way:&lt;/P&gt;&lt;P&gt;I have 5 company Plants: A, B, C, D and E.&lt;/P&gt;&lt;P&gt;Each Plant has Stock on hand and average weekly Sales, so the expressions (remember, very simplified) are sum(Stock), sum(Weekly Sales), and Weeks' Cover=sum(Stock)/sum(Weekly Sales).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is one straight table that has a great deal of detail in it and applies to all 5 Plants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want to create a specific Summary Table that applies to ONLY Plants A, B and C, not showing D and E at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Plant&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Stock&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Weekly Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Weeks' Cover&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3.0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make the Plant Dimension show all 3 Plants, regardless of whether a Plant might be excluded due to other dimensions' selection, i.e. if the Plant isn't relevant to the selection then the sum(Stock) should show 0, and so should the Weekly Sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, I can't seem to get all 3 Plants to remain showing.&lt;/P&gt;&lt;P&gt;A Calculated Dimension that half works is, If(Plant='A' or Plant='B' or Plant = 'C', Plant, null()) - meaning that Plants D and E will not show (as long as null dimensions are suppressed). However, as soon as a selection occurs that excludes one of the wanted Plants (let's say this is because a particular Product is selected and it isn't stocked in Plant C) , then the row with C in it disappears. I want Plant C to show, sum(Stock) to = 0, and sum(Weekly Sales) also 0 (Weeks' Cover would show -). Really, I just want the row headed by C to remain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I need to have an aggr() statement in the Calculated Dimension, and somehow refer to the Complete Set {1}, modified to exclude Plants D and E. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I can't seem to achieve that and I don't know whether it's because my syntax is wrong - highly likely! - or because it's just not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 06:04:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60704#M10084</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2018-02-21T06:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60705#M10085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using set expression in the calc dimension to prevent selection of plant affecting summary:&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Aggr(Only({&amp;lt;Plant = {'A', 'B', 'C'}&amp;gt;} Plant), Plant)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 06:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60705#M10085</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-02-21T06:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60706#M10086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or exclude specific plants&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Aggr(Only({&amp;lt;Plant -= {'D', 'E'}&amp;gt;} Plant), Plant)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 06:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60706#M10086</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-02-21T06:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60707#M10087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan.&lt;/P&gt;&lt;P&gt;I want to aggregate over the complete set, so modified your formula to read:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Aggr(Only({1 &amp;lt;Plant = {'A', 'B', 'C'}&amp;gt;} Plant), Plant)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But - this still doesn't aggregate over the whole set, somehow I need to poll all the Plants that are available. I need something like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Aggr(Only({1 &amp;lt;Plant = {'A', 'B', 'C'}&amp;gt;} Plant), {1} Plant)&amp;nbsp;&amp;nbsp; or&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;EM&gt;Aggr({1} Only({1 &amp;lt;Plant = {'A', 'B', 'C'}&amp;gt;} Plant), Plant)&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;but of course neither of these has the correct syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60707#M10087</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2018-02-21T22:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60708#M10088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may try something like this - &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1431244"&gt;What does it mean sum({1} 0)?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60708#M10088</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2018-02-21T22:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60709#M10089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remember that you disable 'suppress zero values' on presentation tab (I guess your expressions return zero for dimension values that are excluded by user selection, which leads to removal of that lines by that presentation option).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: also, adding an expression with a constant 1 and hiding the expression might help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:36:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60709#M10089</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-02-21T22:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60710#M10090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Digvijay, this gave me the result I wanted.&lt;/P&gt;&lt;P&gt;By adding +Sum({1} 0) to the end of both my expressions for Stock and Weekly Sales, and going back to my original calculated dimension formula of&amp;nbsp; If(Plant='A' or Plant='B' or Plant = 'C', Plant, null()), then the wanted Plants always display, even if they have 0.00 as a value.&lt;/P&gt;&lt;P&gt;There is always a way!!&lt;/P&gt;&lt;P&gt;&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;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60710#M10090</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2018-02-21T22:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension that Uses Complete Set</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60711#M10091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Credit goes to our legends &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt; / &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;, as I remember they suggest these tricks quite often here. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 23:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-that-Uses-Complete-Set/m-p/60711#M10091</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2018-02-21T23:03:14Z</dc:date>
    </item>
  </channel>
</rss>

