<?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 Accumulation across Dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Accumulation-across-Dimensions/m-p/2534483#M108380</link>
    <description>&lt;P&gt;I've got a tricky one here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to understand where the problem with this expression is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RangeSum(Above( Sum(child_value), 0, RowNo()))
/
Sum( TOTAL &amp;lt;parent_mkt_cap&amp;gt; child_value)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I've got 2 parent orders.&amp;nbsp;123 and&amp;nbsp;456.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dimension parent_mkt_cap is Mid for 123, and Small for 456.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each child belong to either parent 123 or 456.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The child_time_pct is a relative measure, per parent, of when the child appeared in the timeline of the parent_id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if child_time_pct = 0, it means at the very start of the parent, =1 means its the last child in the parent, =0.5 means it's exactly halfway through the parent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to achieve is a cumulative, relative sum of child_value, where the cumulative element is across the child_time_pct, and respects the parent_mkt_cap dimension.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for 123, it accumulates the child_value, in order of child_time_pct . So the final value for parent_mkt_cap=Mid is (5082+1436+1286+2275+1483+1755+1628). Note that the dimension across which to accumlate is parent_mkt_cap, not parent_id. I then need to divide that value by the total of the child_value under the same parent_mkt_cap to get the measure relative to the value of the parent_mkt_cap&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any solutions much appreciated.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;+------------+----------+-------------+---------------+----------------+
| parent_id  | child_id | child_value | parent_mkt_cap| child_time_pct |
+------------+----------+-------------+---------------+----------------+
| 123        | 45386    | 5082        | Mid           | 0.00           |
| 123        | 92537    | 1436        | Mid           | 0.03           |
| 123        | 21228    | 1286        | Mid           | 0.23           |
| 123        | 52571    | 2275        | Mid           | 0.23           |
| 123        | 6092     | 1483        | Mid           | 0.54           |
| 123        | 14460    | 1755        | Mid           | 0.54           |
| 123        | 44845    | 1628        | Mid           | 1.00           |
| 456        | 135178   | 39759       | Small         | 0.00           |
| 456        | 136857   | 1904        | Small         | 0.50           |
| 456        | 138173   | 364         | Small         | 0.50           |
| 456        | 145301   | 3683        | Small         | 0.50           |
| 456        | 142031   | 1281        | Small         | 0.53           |
| 456        | 152620   | 618         | Small         | 1.00           |
+------------+----------+-------------+---------------+----------------+&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Oct 2025 16:50:05 GMT</pubDate>
    <dc:creator>johnnyjohn</dc:creator>
    <dc:date>2025-10-27T16:50:05Z</dc:date>
    <item>
      <title>Accumulation across Dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulation-across-Dimensions/m-p/2534483#M108380</link>
      <description>&lt;P&gt;I've got a tricky one here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to understand where the problem with this expression is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RangeSum(Above( Sum(child_value), 0, RowNo()))
/
Sum( TOTAL &amp;lt;parent_mkt_cap&amp;gt; child_value)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I've got 2 parent orders.&amp;nbsp;123 and&amp;nbsp;456.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dimension parent_mkt_cap is Mid for 123, and Small for 456.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each child belong to either parent 123 or 456.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The child_time_pct is a relative measure, per parent, of when the child appeared in the timeline of the parent_id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if child_time_pct = 0, it means at the very start of the parent, =1 means its the last child in the parent, =0.5 means it's exactly halfway through the parent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to achieve is a cumulative, relative sum of child_value, where the cumulative element is across the child_time_pct, and respects the parent_mkt_cap dimension.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for 123, it accumulates the child_value, in order of child_time_pct . So the final value for parent_mkt_cap=Mid is (5082+1436+1286+2275+1483+1755+1628). Note that the dimension across which to accumlate is parent_mkt_cap, not parent_id. I then need to divide that value by the total of the child_value under the same parent_mkt_cap to get the measure relative to the value of the parent_mkt_cap&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any solutions much appreciated.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;+------------+----------+-------------+---------------+----------------+
| parent_id  | child_id | child_value | parent_mkt_cap| child_time_pct |
+------------+----------+-------------+---------------+----------------+
| 123        | 45386    | 5082        | Mid           | 0.00           |
| 123        | 92537    | 1436        | Mid           | 0.03           |
| 123        | 21228    | 1286        | Mid           | 0.23           |
| 123        | 52571    | 2275        | Mid           | 0.23           |
| 123        | 6092     | 1483        | Mid           | 0.54           |
| 123        | 14460    | 1755        | Mid           | 0.54           |
| 123        | 44845    | 1628        | Mid           | 1.00           |
| 456        | 135178   | 39759       | Small         | 0.00           |
| 456        | 136857   | 1904        | Small         | 0.50           |
| 456        | 138173   | 364         | Small         | 0.50           |
| 456        | 145301   | 3683        | Small         | 0.50           |
| 456        | 142031   | 1281        | Small         | 0.53           |
| 456        | 152620   | 618         | Small         | 1.00           |
+------------+----------+-------------+---------------+----------------+&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 16:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulation-across-Dimensions/m-p/2534483#M108380</guid>
      <dc:creator>johnnyjohn</dc:creator>
      <dc:date>2025-10-27T16:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulation across Dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/Accumulation-across-Dimensions/m-p/2534498#M108385</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;RangeSum(Above( Sum(child_value)))&lt;BR /&gt;/ Sum( TOTAL &amp;lt;parent_mkt_cap&amp;gt; child_value)&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 22:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Accumulation-across-Dimensions/m-p/2534498#M108385</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2025-10-27T22:33:36Z</dc:date>
    </item>
  </channel>
</rss>

