<?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: Summing children amount on parent data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649484#M48437</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;First of all, thanks for your answer.&lt;/P&gt;&lt;P&gt;I do not think it is feasible. I am going to explain a bit more the context : we have some intercompany business (internal deals), then we sell our product to a end customer (external deals).&lt;/P&gt;&lt;P&gt;So sometimes we have internal deal (C) linked to internal deal (B) linked to external deal (A) (it is the max imbrication allowed, there is no four level hierarchy).&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;PARENT_DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;TYPOLOGY&lt;/TD&gt;&lt;TD&gt;AMOUNT&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;EXTERNAL&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;INTERNAL&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;INTERNAL&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have the same requirement :&amp;nbsp; sum the amount of deal C in front of deal B (for some intercompany margin elimination purpose), but deal B has already a parent deal number (A), that I cannot change.&lt;/P&gt;&lt;P&gt;And if I use a technical field I guess it will be missleading for the report users.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Nov 2019 09:20:00 GMT</pubDate>
    <dc:creator>fabrice_lattern</dc:creator>
    <dc:date>2019-11-21T09:20:00Z</dc:date>
    <item>
      <title>Summing children amount on parent data</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649097#M48396</link>
      <description>&lt;P&gt;Hello everybody !&lt;/P&gt;&lt;P&gt;I am struggling to build an aggregate function. I have a kind of hierarchy in my data (without having define a hierarchy in the load script) :&lt;/P&gt;&lt;P&gt;DEAL_NUMBER, PARENT_DEAL_NUMBER, AMOUNT&lt;/P&gt;&lt;P&gt;Now, I am trying to build a pivot table with the DEAL_NUMBER as dimension, showing :&lt;/P&gt;&lt;P&gt;- The amount of the deal&lt;BR /&gt;- The amount of the children deals&lt;/P&gt;&lt;P&gt;I am trying to do something like this, but of course it does not work as my dimension in the pivot is the DEAL_NUMBER and not the PARENT_DEAL_NUMBER, and I do not know of to put this amount in front of the parent deal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AGGR(SUM(AMOUNT), PARENT_DEAL_KEY)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is an example of what should be achieved&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;PARENT_DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;AMOUNT&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;AMOUNT&lt;/TD&gt;&lt;TD&gt;CHILDREN AMOUNT&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&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;Thanks in advance for any advice !&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649097#M48396</guid>
      <dc:creator>fabrice_lattern</dc:creator>
      <dc:date>2024-11-16T04:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Summing children amount on parent data</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649103#M48397</link>
      <description>&lt;P&gt;Is it possible to assign the same DEAL_NUMBER to PARENT_DEALER_NUMBER when PARENT_DEALER_NUMBER is null or blank? What I mean is to do this in the script?&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;PARENT_DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;AMOUNT&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;A&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you do this, it becomes easy and you can do like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If(DEAL_NUMBER = PARENT_DEAL_NUMBER,
  Sum(TOTAL &amp;lt;PARENT_DEAL_NUMBER&amp;gt; 
    If(DEAL_NUMBER &amp;lt;&amp;gt; PARENT_DEAL_NUMBER, AMOUNT
    )
  )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 13:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649103#M48397</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-20T13:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Summing children amount on parent data</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649484#M48437</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;First of all, thanks for your answer.&lt;/P&gt;&lt;P&gt;I do not think it is feasible. I am going to explain a bit more the context : we have some intercompany business (internal deals), then we sell our product to a end customer (external deals).&lt;/P&gt;&lt;P&gt;So sometimes we have internal deal (C) linked to internal deal (B) linked to external deal (A) (it is the max imbrication allowed, there is no four level hierarchy).&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;PARENT_DEAL_NUMBER&lt;/TD&gt;&lt;TD&gt;TYPOLOGY&lt;/TD&gt;&lt;TD&gt;AMOUNT&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;EXTERNAL&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;INTERNAL&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;INTERNAL&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have the same requirement :&amp;nbsp; sum the amount of deal C in front of deal B (for some intercompany margin elimination purpose), but deal B has already a parent deal number (A), that I cannot change.&lt;/P&gt;&lt;P&gt;And if I use a technical field I guess it will be missleading for the report users.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 09:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649484#M48437</guid>
      <dc:creator>fabrice_lattern</dc:creator>
      <dc:date>2019-11-21T09:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Summing children amount on parent data</title>
      <link>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649600#M48452</link>
      <description>&lt;P&gt;May be you need to set this up as a Hierarchy load in the script?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 12:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Summing-children-amount-on-parent-data/m-p/1649600#M48452</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-21T12:52:23Z</dc:date>
    </item>
  </channel>
</rss>

