<?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 Help with RangeSum Above aggregation function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648038#M731059</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm in desperate need of help since I've been trying several things but I can't make this work as it should so I would really appreciate it if someone could give me a hand.&lt;/P&gt;&lt;P&gt;I'm trying to calculate a statistic that gives the maximum difference between two columns that have the accumulated distribution (percentage) of a dimension. I could calculate the accumulated percentages and the difference using RangeSum Above but somehow when I try applying the max it doesn't work.&lt;/P&gt;&lt;P&gt;I attach the qvw and here is the pivot table I have:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-11-18 example KS.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23866i9F009371B5A8C50D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-11-18 example KS.png" alt="2019-11-18 example KS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am calculating the Accumulated diff like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diff.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23861i9143C3A39B87234B/image-size/large?v=v2&amp;amp;px=999" role="button" title="diff.PNG" alt="diff.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and the max like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="max.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23862i1F441E389BDBF4E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="max.PNG" alt="max.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But as you see in the image it doesn't work in all cases.&lt;/P&gt;&lt;P&gt;Please find attached the qvw&lt;/P&gt;&lt;P&gt;Thanks!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>SaraiMoH</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Help with RangeSum Above aggregation function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648038#M731059</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm in desperate need of help since I've been trying several things but I can't make this work as it should so I would really appreciate it if someone could give me a hand.&lt;/P&gt;&lt;P&gt;I'm trying to calculate a statistic that gives the maximum difference between two columns that have the accumulated distribution (percentage) of a dimension. I could calculate the accumulated percentages and the difference using RangeSum Above but somehow when I try applying the max it doesn't work.&lt;/P&gt;&lt;P&gt;I attach the qvw and here is the pivot table I have:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-11-18 example KS.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23866i9F009371B5A8C50D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-11-18 example KS.png" alt="2019-11-18 example KS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am calculating the Accumulated diff like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diff.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23861i9143C3A39B87234B/image-size/large?v=v2&amp;amp;px=999" role="button" title="diff.PNG" alt="diff.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and the max like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="max.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23862i1F441E389BDBF4E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="max.PNG" alt="max.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But as you see in the image it doesn't work in all cases.&lt;/P&gt;&lt;P&gt;Please find attached the qvw&lt;/P&gt;&lt;P&gt;Thanks!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648038#M731059</guid>
      <dc:creator>SaraiMoH</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with RangeSum Above aggregation function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648053#M731060</link>
      <description>&lt;P&gt;Are you using QlikView 12 or above... if you are, then try this for Max&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=IF(DIMENSIONALITY() = 1 
   ,MAX(AGGR(
              RangeSum(Above(   SUM( {&amp;lt;PERIOD_LABEL={'Monitoring Period'}&amp;gt;}  SUM_IX) / SUM( {&amp;lt;PERIOD_LABEL={'Monitoring Period'}&amp;gt;}  TOTAL &amp;lt;COUNTRY_CODE&amp;gt; SUM_IX) 
                              - SUM( {&amp;lt;PERIOD_LABEL={'Development Period'}&amp;gt;} SUM_IX) / SUM( {&amp;lt;PERIOD_LABEL={'Development Period'}&amp;gt;} TOTAL &amp;lt;COUNTRY_CODE&amp;gt; SUM_IX) 
                             , 0, RowNo() ) )                  
             ,COUNTRY_CODE, (SUBGRADE, (TEXT))                                                                                                                
             )     
         )
     )
                   
//     FirstSortedValue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23871iC4CB5F0321AC4DA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 15:31:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648053#M731060</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-18T15:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with RangeSum Above aggregation function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648085#M731061</link>
      <description>&lt;P&gt;Thank you very much Sunny!&amp;nbsp;It works now&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yes, I'm using qlikview 12.20&amp;nbsp; I'm just wondering what does the&amp;nbsp; (SUBGRADE, (TEXT)&amp;nbsp; is doing?&lt;/P&gt;&lt;P&gt;Have a nice day &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 16:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648085#M731061</guid>
      <dc:creator>SaraiMoH</dc:creator>
      <dc:date>2019-11-18T16:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with RangeSum Above aggregation function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648090#M731062</link>
      <description>&lt;P&gt;Aggr() sort your dimensions in the load order which could be different from the order you are using in the chart. Why it makes a difference? It is because you are doing accumulation which is dependent on the order of dimension. In order to get the correct order... which it seems was the text sorting of your second dimension... we use this syntax. Syntax itself can be understood by reading the below article.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-sortable-Aggr-function-is-finally-here/ba-p/1470262" target="_blank" rel="noopener"&gt;sortable Aggr function&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 16:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648090#M731062</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-18T16:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with RangeSum Above aggregation function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648103#M731063</link>
      <description>&lt;P&gt;Great! I'm so thankful since I was quite frustrated after trying many different things and without your help, I don't think I would have been able to make it work. Thanks for your support&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 16:29:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648103#M731063</guid>
      <dc:creator>SaraiMoH</dc:creator>
      <dc:date>2019-11-18T16:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with RangeSum Above aggregation function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648112#M731064</link>
      <description>&lt;P&gt;No problem at all&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 16:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-RangeSum-Above-aggregation-function/m-p/1648112#M731064</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-18T16:34:03Z</dc:date>
    </item>
  </channel>
</rss>

