<?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: calculation using nested sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216140#M389487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW, once the table shows the desired result you can easily transform to a bar chart, just check the 'invisible' option on the expressions tab for each expression except the one you want to show.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Nov 2016 12:54:35 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2016-11-09T12:54:35Z</dc:date>
    <item>
      <title>calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216130#M389477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you advice on this calculation , what is wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum&lt;SPAN style="color: #993366;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp; Sum(ACT_QTY_CLOSE) * Sum(UNIT_EQUIVALENCE))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(&lt;SPAN style="color: #99cc00;"&gt;(Sum(ACT_QTY_OPEN) *Sum(UNIT_EQUIVALENCE))&lt;/SPAN&gt; + &lt;SPAN style="color: #800000;"&gt;(sum(ITEM_QUANTITY_PUR * ITEM_PURCHASE_EQUIVALENCE) * Sum(UNIT_EQUIVALENCE))&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(&lt;SPAN style="color: #ff00ff;"&gt;(sum(ITEM_CONSUMPTION)* Sum(UNIT_EQUIVALENCE))&lt;/SPAN&gt; + &lt;SPAN style="color: #0000ff;"&gt;Sum(WASTAGES)&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* ITEM_PURCHASE_PRICE&lt;SPAN style="color: #008080;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help please.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/34135"&gt;ecolomer&lt;/A&gt;‌&lt;A href="https://community.qlik.com/qlik-users/21969"&gt;rubenmarin&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ahmad Kastero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:14:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216130#M389477</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-08T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216131#M389478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not possible to nest aggregations without an &lt;A href="https://community.qlik.com/qlik-blogpost/2967"&gt;AGGR...&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:20:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216131#M389478</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-11-08T15:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216132#M389479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i try to do it wit Aggr but it is not work ,&lt;/P&gt;&lt;P&gt;i try with the main field that i need to do the calculation on it &lt;STRONG&gt;(%Cons_Item_Key)&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there is another way or only we can do it by using AGGR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:25:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216132#M389479</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-08T15:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216133#M389480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ahmad, maybe using RangeSum:&lt;/P&gt;&lt;P&gt;RangeSum(&lt;/P&gt;&lt;P&gt; RangeSum(&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(ACT_QTY_CLOSE) * Sum(UNIT_EQUIVALENCE))),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; RangeSum(&lt;SPAN style="color: #99cc00; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(ACT_QTY_OPEN) *Sum(UNIT_EQUIVALENCE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(ITEM_QUANTITY_PUR * ITEM_PURCHASE_EQUIVALENCE) * Sum(UNIT_EQUIVALENCE))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; -RangeSum(&lt;SPAN style="color: #ff00ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum(ITEM_CONSUMPTION)* Sum(UNIT_EQUIVALENCE),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff00ff; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(WASTAGES))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;* ITEM_PURCHASE_PRICE&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #008080;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Not tested, maybe there is a typo... and I never used RangeSum this way, so I'm not sure if this can work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216133#M389480</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-08T15:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216134#M389481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ruben, but unfortunately not working .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:53:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216134#M389481</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-08T15:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216135#M389482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you could logically replace the sum() around the sum(Fields) with a + than you could go with the approach from Ruben otherwise you will need the aggr() with the proper dimensions to those parts where you couldn't replace them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:53:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216135#M389482</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-11-08T15:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216136#M389483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do it step by step and give each part a single expression and if they work like expected put them together and check again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 15:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216136#M389483</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-11-08T15:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216137#M389484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did it more simpler and worked but, as I said, I'm not sure if that complexity can work (I don't see why not).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also it was written directly in the post, so typo's may appear, rigth now I saw a lack of a comma:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(UNIT_EQUIVALENCE))&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;, /&lt;/STRONG&gt;/This comma was forgotten in my previous post&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2016 16:22:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216137#M389484</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-08T16:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216138#M389485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;i add a sample for my target bar chart and my reference value in table (&lt;STRONG&gt; Recipe Consumption)&lt;/STRONG&gt; if you see in this table the last column is the &lt;STRONG&gt;VALUED DIFFERENCE &lt;/STRONG&gt; this column result of all that nested sum but when i try to do it in bar chart i can't.&lt;/P&gt;&lt;P&gt;i need to see for each item the total of &lt;STRONG style="font-size: 13.3333px;"&gt;VALUED DIFFERENCE &lt;/STRONG&gt;in bar chart even (Positive or Negative value). this is my target.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 11:50:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216138#M389485</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-09T11:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216139#M389486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ahmad, the expression 'Theo.Cons.Recipe Qty' is a conditional expression, when the condition is false the expression is not calculated, so every other expression that uses this expression can't be calculated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can transform the null in 0 using Alt(): Alt([&lt;SPAN style="font-size: 13.3333px;"&gt;Theo.Cons.Recipe Qty&lt;/SPAN&gt;],0), but the deference% will also return null (it will be a division by zero).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If what you want is to hide this column but still use the values use the conditional show in the presentation tab instead of the conditional expression of the expression tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the VALUE difference column can't be calculated that way because it has many different values for ITEM_PURCHASE_PRICE, it should be only one value (using an expressiont hat returns that value) or using aggr() so it uses different &lt;SPAN style="font-size: 13.3333px;"&gt;ITEM_PURCHASE_PRICE for each Aggr() dimension value... but I think this wouldn't be fit the intention of the expression so you need to kwon what to do with all the different &lt;SPAN style="font-size: 13.3333px;"&gt;ITEM_PURCHASE_PRICE... wich value has to be used in VALUE DIFFERENCE?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 12:06:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216139#M389486</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-09T12:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216140#M389487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW, once the table shows the desired result you can easily transform to a bar chart, just check the 'invisible' option on the expressions tab for each expression except the one you want to show.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 12:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216140#M389487</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-09T12:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216141#M389488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ruben,&lt;/P&gt;&lt;P&gt;in the first sheet Recipe consumption all the calculation to convert all my unit from (Stock Room unit in DB) to see it in recipe unit and i validate all that with my DB .&lt;/P&gt;&lt;P&gt;the value that i use it to get the VALUED DIFFERENCE is all the column before the &lt;SPAN style="font-size: 13.3333px;"&gt;VALUED DIFFERENCE expression (&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;END.THE.QTY=([BEGINNING QTY] + [Purchase QTY ])-( [Theo.Cons.Recipe Qty] +[LOSSES WASTES] )&lt;/P&gt;&lt;P&gt;[BEGINNING QTY] =Sum(ACT_QTY_OPEN) *Sum(UNIT_EQUIVALENCE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Purchase QTY ]=sum(ITEM_QUANTITY_PUR * ITEM_PURCHASE_EQUIVALENCE) * Sum(UNIT_EQUIVALENCE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Theo.Cons.Recipe Qty]&lt;/STRONG&gt;=&lt;SPAN style="color: #ff0000;"&gt;$(vTheoretCons_Recipe)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;==&amp;lt; &lt;SPAN style="color: #ff0000;"&gt;sum(ITEM_CONSUMPTION)* Sum(UNIT_EQUIVALENCE)&lt;/SPAN&gt; &amp;gt;==&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[LOSSES WASTES]&lt;/STRONG&gt; =Sum(WASTAGES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[END.ACT.QTY]&lt;/STRONG&gt; = Sum(ACT_QTY_CLOSE) * Sum(UNIT_EQUIVALENCE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[DEFFERENCE]&lt;/STRONG&gt; = [END.ACT.QTY] - [END.THE.QTY]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;all the above is to get the DEFFERENCE QTY and multiplied it with the &lt;SPAN style="color: #ff00ff;"&gt;Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;VALUED DIFFERENCE&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=[DEFFERENCE] * &lt;SPAN style="color: #ff00ff;"&gt;ITEM_PURCHASE_PRICE .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff00ff; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333px;"&gt;in this table is working fine but when i try to build the bar chart report only for &lt;STRONG style="font-size: 13.3333px;"&gt;VALUED DIFFERENCE &lt;/STRONG&gt; over the Item as Dimension i need to calculate again all the above in one expression and&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;multiply it with the &lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff;"&gt;Price &lt;SPAN style="color: #000000;"&gt;to get the same number as the table &lt;STRONG style="font-size: 13.3333px;"&gt;VALUED DIFFERENCE &lt;/STRONG&gt; number ; but this is not working fine with me .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff00ff; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;and the &lt;/SPAN&gt;'Theo.Cons.Recipe Qty' is a conditional expression, i use it to show only with the group in the Item level not in the branch level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 13:16:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216141#M389488</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-09T13:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216142#M389489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i do this and this is work in table but when i try to do it in bar chart in one expression it is not working fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 13:31:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216142#M389489</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-09T13:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216143#M389490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i try to do fast change to chart and it's changed to bar chart but it shown all the other values and i check the 'invisible' option and i kept the&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;STRONG&gt;VALUE DIFFERENCE &lt;/STRONG&gt; nothing appear in the chart. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 13:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216143#M389490</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-09T13:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216144#M389491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ahmad, I unchecked the conditional expression of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Theo.Cons.Recipe Qty&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;] and&lt;/SPAN&gt; changed the VALUE DIFFERENCE expression to "=[DEFFERENCE] * Avg(ITEM_PURCHASE_PRICE)". This is to allow the expression to return a value, &lt;STRONG&gt;if the table doesn't shows any value in this column it will not show any value in chart,&lt;/STRONG&gt; so the first thing is work with the table so it returns a value for that expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checked invisible in all expressions but the VALUE DIFFERENCE and changed to bar chart. It shows the values of the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 13:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216144#M389491</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-09T13:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216145#M389492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ruben it is look working on the item level but when i put it on the branch level not calculated correctly i will investigate this.&lt;/P&gt;&lt;P&gt;i have 2 or 3 question :&lt;/P&gt;&lt;P&gt;1. what is the way to use like this nested calculation in one expression?&lt;/P&gt;&lt;P&gt;2.when i select like a small item that have small amount on in the negative value the bar size not changed, i thing because it take the same value from the table and not interact with the value selected to increasing bar size&amp;nbsp;&amp;nbsp; ; is there is any way to solve this.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;3. you use the AVG&amp;nbsp; to get the value ; but as i know this to get the &lt;/SPAN&gt;Average of&amp;nbsp; any calculated number ; how it is work here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and really thanks for help me on this .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 14:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216145#M389492</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-09T14:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216146#M389493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ahmad, usually the way to go is what Marcus said: using Aggr(). But your whole expression seems complicated to work with Aggr() (and I'm not uderstanding the logic behind... I lack of free time to deeply check .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the current table, looking it by item the numbers seems more reasonable, you should review all the expressions. In example for the BEGINNING QTY it should be:&lt;/P&gt;&lt;P&gt;Sum(Aggr(Sum(ACT_QTY_OPEN) *Sum(UNIT_EQUIVALENCE), PURCHASE_ITEM_DESCRIPTION))&lt;/P&gt;&lt;P&gt;// This will do an independent operation for each item in the branch and then sums, and also works when you see it by items&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check incosistent values, add totals to all columns, select a branch and check if the values shown when you group by branch is the same value of the total when you see it by item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the questions:&lt;/P&gt;&lt;P&gt;1. using Aggr() or RangeSum()&lt;/P&gt;&lt;P&gt;2. Have you checked the axis values? maybe the bar looks the same but axis values have changed&lt;/P&gt;&lt;P&gt;3. I used Avg just to obtain a value, it wouldn't be to correct way to calculate the expression... sorry I don't have enough free time to try to understand the intended logic behind and how to obtain the correct values but as general comment you can't use the same expressions when you look by item than by branch, the general fix will be similar than the one I posted about &lt;SPAN style="font-size: 13.3333px;"&gt;BEGINNING QTY: using aggr to calculate each item separatedly, then sum the values returned by Aggr()&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2016 14:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216146#M389493</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-09T14:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216147#M389494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ruben my friend thank you very much for your effort, i find way to do it in one expression .&lt;/P&gt;&lt;P&gt;thank you very much and i will post it soon. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 13:32:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216147#M389494</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-10T13:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216148#M389495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;finaly i put in one expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(Sum(ACT_QTY_CLOSE * UNIT_EQUIVALENCE) -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((Sum(ACT_QTY_OPEN * UNIT_EQUIVALENCE) + sum(ITEM_QUANTITY_PUR * ITEM_PURCHASE_EQUIVALENCE *&amp;nbsp; UNIT_EQUIVALENCE)) -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(sum(ITEM_CONSUMPTION * UNIT_EQUIVALENCE) )- Sum(WASTAGES)))* ITEM_PURCHASE_PRICE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 07:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216148#M389495</guid>
      <dc:creator>jood_ahmad</dc:creator>
      <dc:date>2016-11-14T07:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: calculation using nested sum</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216149#M389496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I didn't tested but I think this wouldn't work when the first dimension is branch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it doesn't works for branch, as a quick test you can try:&lt;/P&gt;&lt;P&gt;Sum(Aggr(&lt;/P&gt;&lt;P&gt; Your_actual_expression&lt;/P&gt;&lt;P&gt;, &lt;EM&gt;ItemFieldName&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ItemFieldName: The field that identifies each different item&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 10:11:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-using-nested-sum/m-p/1216149#M389496</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-14T10:11:16Z</dc:date>
    </item>
  </channel>
</rss>

