<?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: set analysis aggr sum with total by order in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/set-analysis-aggr-sum-with-total-by-order/m-p/1853348#M70461</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121483"&gt;@Shir63&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I think what's happening is that if you change your dimension from &lt;SPAN&gt;[Sale Order Order Number] then your aggregation will no longer be correct because Qlik is now aggregating by that column and the new dimension you've added.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In your aggr( ) you're calling out [Sale Order Order Number] as your grouping which makes sense if that is also your dimension. I presume by adding a different dimension you would then want to see the breakdown by [Sale Order Order Number] and the new column. If that's the case you can try adding this new column name to your total &amp;lt;[Sale Order Order Number]&amp;gt; statements.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 02:20:24 GMT</pubDate>
    <dc:creator>anthonyj</dc:creator>
    <dc:date>2021-10-29T02:20:24Z</dc:date>
    <item>
      <title>set analysis aggr sum with total by order</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-aggr-sum-with-total-by-order/m-p/1852453#M70397</link>
      <description>&lt;P&gt;&amp;nbsp;Hi Guys,&lt;/P&gt;
&lt;P&gt;I have an issue with a formula that is meant to calculate % of discount.&lt;/P&gt;
&lt;TABLE width="689"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="47px"&gt;ORDER NUMBER&lt;/TD&gt;
&lt;TD width="110.802px" height="47px"&gt;List Price&lt;/TD&gt;
&lt;TD width="112.792px" height="47px"&gt;Discount Amount&lt;/TD&gt;
&lt;TD width="71.9896px" height="47px"&gt;is Discount&lt;/TD&gt;
&lt;TD width="63.9688px" height="47px"&gt;Stream&lt;/TD&gt;
&lt;TD width="63.9375px" height="47px"&gt;Name&lt;/TD&gt;
&lt;TD width="157.688px" height="47px"&gt;% of Discount Calculated&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="110.802px" height="25px"&gt;100&lt;/TD&gt;
&lt;TD width="112.792px" height="25px"&gt;20&lt;/TD&gt;
&lt;TD width="71.9896px" height="25px"&gt;Y&lt;/TD&gt;
&lt;TD width="63.9688px" height="25px"&gt;HW&lt;/TD&gt;
&lt;TD width="63.9375px" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="157.688px" height="25px"&gt;0.12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="110.802px" height="25px"&gt;50&lt;/TD&gt;
&lt;TD width="112.792px" height="25px"&gt;10&lt;/TD&gt;
&lt;TD width="71.9896px" height="25px"&gt;Y&lt;/TD&gt;
&lt;TD width="63.9688px" height="25px"&gt;Con&lt;/TD&gt;
&lt;TD width="63.9375px" height="25px"&gt;B&lt;/TD&gt;
&lt;TD width="157.688px" height="25px"&gt;0.12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="110.802px" height="25px"&gt;0&lt;/TD&gt;
&lt;TD width="112.792px" height="25px"&gt;10&lt;/TD&gt;
&lt;TD width="71.9896px" height="25px"&gt;N&lt;/TD&gt;
&lt;TD width="63.9688px" height="25px"&gt;HW&lt;/TD&gt;
&lt;TD width="63.9375px" height="25px"&gt;C&lt;/TD&gt;
&lt;TD width="157.688px" height="25px"&gt;0.12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="110.802px" height="25px"&gt;100&lt;/TD&gt;
&lt;TD width="112.792px" height="25px"&gt;30&lt;/TD&gt;
&lt;TD width="71.9896px" height="25px"&gt;N&lt;/TD&gt;
&lt;TD width="63.9688px" height="25px"&gt;HW&lt;/TD&gt;
&lt;TD width="63.9375px" height="25px"&gt;D&lt;/TD&gt;
&lt;TD width="157.688px" height="25px"&gt;0.12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.802px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="112.792px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="71.9896px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9688px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9375px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="157.688px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.802px" height="25px"&gt;Sum List Price&lt;/TD&gt;
&lt;TD width="112.792px" height="25px"&gt;250&lt;/TD&gt;
&lt;TD width="71.9896px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9688px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9375px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="157.688px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="47px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.802px" height="47px"&gt;Sum Discount = Y&lt;/TD&gt;
&lt;TD width="112.792px" height="47px"&gt;30&lt;/TD&gt;
&lt;TD width="71.9896px" height="47px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9688px" height="47px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9375px" height="47px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="157.688px" height="47px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="106.823px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.802px" height="25px"&gt;% of Discount&lt;/TD&gt;
&lt;TD width="112.792px" height="25px"&gt;0.12&lt;/TD&gt;
&lt;TD width="71.9896px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9688px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="63.9375px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="157.688px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;based on an order # I want to sum all Discount = Y, &amp;amp; all list price inside an order&lt;/P&gt;
&lt;P&gt;receive a % , and give it to each of the lines inside that order.&lt;/P&gt;
&lt;P&gt;then multiply that % in the list price.&lt;/P&gt;
&lt;P&gt;this is the formula i created:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;avg(total &amp;lt;[Sale Order Order Number]&amp;gt;aggr(sum(total &amp;lt;[Sale Order Order Number]&amp;gt; {1&amp;lt;[IS Discount (Y/N)] = {'Y'} &amp;gt;} $(vDiscount))&lt;BR /&gt;/&lt;BR /&gt;sum(total &amp;lt;[Sale Order Order Number]&amp;gt;{1} $(vList2)),[Sale Order Order Number]))&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;P&gt;Sum($(vList2))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the issue is that it only works in a table with the dimension "Sale Order Order Number".&lt;/P&gt;
&lt;P&gt;it doesn't work in a pivot, or with a different dimension.&lt;/P&gt;
&lt;P&gt;what do you think i should do? appreciate your help guys.&lt;/P&gt;
&lt;P&gt;thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 11:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-aggr-sum-with-total-by-order/m-p/1852453#M70397</guid>
      <dc:creator>Shir63</dc:creator>
      <dc:date>2021-10-27T11:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis aggr sum with total by order</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-aggr-sum-with-total-by-order/m-p/1853348#M70461</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121483"&gt;@Shir63&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I think what's happening is that if you change your dimension from &lt;SPAN&gt;[Sale Order Order Number] then your aggregation will no longer be correct because Qlik is now aggregating by that column and the new dimension you've added.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In your aggr( ) you're calling out [Sale Order Order Number] as your grouping which makes sense if that is also your dimension. I presume by adding a different dimension you would then want to see the breakdown by [Sale Order Order Number] and the new column. If that's the case you can try adding this new column name to your total &amp;lt;[Sale Order Order Number]&amp;gt; statements.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 02:20:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-aggr-sum-with-total-by-order/m-p/1853348#M70461</guid>
      <dc:creator>anthonyj</dc:creator>
      <dc:date>2021-10-29T02:20:24Z</dc:date>
    </item>
  </channel>
</rss>

