<?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 Aggregate: going crazy! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-going-crazy/m-p/2060459#M1223270</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;as you can se bellow i created 2 chart - the first one got 2 dimension (Item and Components)&lt;/P&gt;
&lt;P&gt;On the second one i removed the Item and i just left the Components.&lt;/P&gt;
&lt;P&gt;I have an issue with&amp;nbsp;fIeld&amp;nbsp;&lt;STRONG&gt;Implant Need&lt;/STRONG&gt;: i would like to have "12" also as result on the second table.&lt;/P&gt;
&lt;P&gt;The field Implant need is calculated as follow: If Order Quantity is &amp;gt; than Implant Stock, then Order Quantity-Implant Stock.&lt;/P&gt;
&lt;P&gt;if(sum(ORDERQuantity)-sum(IMPLANTSTOCK)&amp;gt;0,sum(ORDERQuantity)-sum(IMPLANTSTOCK),0)&lt;/P&gt;
&lt;P&gt;to have 12 also on the second table - so to have the table working by "Item" - what i should do?&lt;BR /&gt;Please help!!&lt;BR /&gt;Thank you!!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aggregate.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/104915iEC83BCA45F097D54/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggregate.PNG" alt="Aggregate.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2023 09:53:43 GMT</pubDate>
    <dc:creator>qlikviewaf</dc:creator>
    <dc:date>2023-04-14T09:53:43Z</dc:date>
    <item>
      <title>Aggregate: going crazy!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-going-crazy/m-p/2060459#M1223270</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;as you can se bellow i created 2 chart - the first one got 2 dimension (Item and Components)&lt;/P&gt;
&lt;P&gt;On the second one i removed the Item and i just left the Components.&lt;/P&gt;
&lt;P&gt;I have an issue with&amp;nbsp;fIeld&amp;nbsp;&lt;STRONG&gt;Implant Need&lt;/STRONG&gt;: i would like to have "12" also as result on the second table.&lt;/P&gt;
&lt;P&gt;The field Implant need is calculated as follow: If Order Quantity is &amp;gt; than Implant Stock, then Order Quantity-Implant Stock.&lt;/P&gt;
&lt;P&gt;if(sum(ORDERQuantity)-sum(IMPLANTSTOCK)&amp;gt;0,sum(ORDERQuantity)-sum(IMPLANTSTOCK),0)&lt;/P&gt;
&lt;P&gt;to have 12 also on the second table - so to have the table working by "Item" - what i should do?&lt;BR /&gt;Please help!!&lt;BR /&gt;Thank you!!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aggregate.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/104915iEC83BCA45F097D54/image-size/large?v=v2&amp;amp;px=999" role="button" title="Aggregate.PNG" alt="Aggregate.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 09:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-going-crazy/m-p/2060459#M1223270</guid>
      <dc:creator>qlikviewaf</dc:creator>
      <dc:date>2023-04-14T09:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate: going crazy!</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-going-crazy/m-p/2060475#M1223272</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/2485"&gt;@qlikviewaf&lt;/a&gt;&amp;nbsp; Your calculation works at Item and Component level, but in second table you don't have Item, so your actual calculation works as if(12-247 &amp;gt;0,...) which will not work as expected, so you need to user aggr function to work your calculation at Item and Component level&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;sum(aggr(&lt;/STRONG&gt;if(sum(ORDERQuantity)-sum(IMPLANTSTOCK)&amp;gt;0,sum(ORDERQuantity)-sum(IMPLANTSTOCK),0)&lt;STRONG&gt;, Item, Component))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 10:21:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-going-crazy/m-p/2060475#M1223272</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2023-04-14T10:21:35Z</dc:date>
    </item>
  </channel>
</rss>

