<?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: Problems with order and accumulated in tables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505056#M103887</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;I think you solution not work, I hope my&amp;nbsp;&lt;SPAN&gt;doubt all of them undertand me, my higher problem is when I agree dimension, the column "Cantidad" desorder and I need orden descendent.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank yo for you reply !&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Feb 2025 19:26:50 GMT</pubDate>
    <dc:creator>DeanW</dc:creator>
    <dc:date>2025-02-08T19:26:50Z</dc:date>
    <item>
      <title>Problems with order and accumulated in tables</title>
      <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505002#M103876</link>
      <description>&lt;P&gt;Hello everyone.&lt;/P&gt;
&lt;P&gt;I would like to ask for your help with a very important topic: I want to create a cumulative total in a table. The problem I have is that when I perform the cumulative calculation, the &lt;CODE&gt;RowNo()&lt;/CODE&gt; function distorts a column that should be sorted in descending order.&lt;/P&gt;
&lt;P&gt;Now I am going to show you a table that is working.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DeanW_0-1738957736864.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177332iDC26EC10C484E714/image-size/large?v=v2&amp;amp;px=999" role="button" title="DeanW_0-1738957736864.png" alt="DeanW_0-1738957736864.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can see that I have a table of quantity sorted in descending order, your participation and the cumulative participation all in percentages. &lt;BR /&gt;Quantity: Sum({&amp;lt;%Flag_Invoice={1}&amp;gt;} QUANTITY * If(IsNull(MENGE.STPO), 1, MENGE.STPO) * Sign)&lt;/P&gt;
&lt;P&gt;Cumulative %Participation: &lt;BR /&gt;Sum({&amp;lt;%Flag_Flag_Invoice={1}&amp;gt;} QUANTITY * If(IsNull(MENGE.STPO), 1, MENGE.STPO) * Sign)&lt;BR /&gt;/&lt;BR /&gt;Sum(TOTAL{&amp;lt;%Flag_Invoice={1}&amp;gt;} QUANTITY * If(If(IsNull(MENGE.STPO), 1, MENGE.STPO) * Sign)&lt;/P&gt;
&lt;P&gt;%Accum:&lt;BR /&gt;RangeSum(Above($(v%_Accumulated_Quantity),0,RowNo(TOTAL)))&lt;/P&gt;
&lt;P&gt;Being the variable $(v%_Accumulated_Cant) equal to %Accum Share I did it this way just to make it look neater.&lt;/P&gt;
&lt;P&gt;BUT! &lt;BR /&gt;When I add an extra dimension, my quantity gets messed up and doesn't look right.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DeanW_1-1738958066659.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177333i5E6C347B6142D3D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="DeanW_1-1738958066659.png" alt="DeanW_1-1738958066659.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;NOTES: &lt;BR /&gt;In the sort tab I set the first dimension to sort by expression and the rest I unsorted the sorts and it didn't work either.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DeanW_2-1738958106926.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177334i5BBF23503F74D7BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="DeanW_2-1738958106926.png" alt="DeanW_2-1738958106926.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What can you do!&lt;/P&gt;
&lt;P&gt;Please!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&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>Fri, 07 Feb 2025 19:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505002#M103876</guid>
      <dc:creator>DeanW</dc:creator>
      <dc:date>2025-02-07T19:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with order and accumulated in tables</title>
      <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505051#M103886</link>
      <description>&lt;P&gt;Hi, maybe you also need a TOTAL in your Above function:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;RangeSum(Above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; $(v%_Accumulated_Quantity),0,RowNo(TOTAL)))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Beign a $-expansion i'm not sure if this will work but it's an easy try.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Feb 2025 17:49:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505051#M103886</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-02-08T17:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with order and accumulated in tables</title>
      <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505056#M103887</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;I think you solution not work, I hope my&amp;nbsp;&lt;SPAN&gt;doubt all of them undertand me, my higher problem is when I agree dimension, the column "Cantidad" desorder and I need orden descendent.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank yo for you reply !&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Feb 2025 19:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505056#M103887</guid>
      <dc:creator>DeanW</dc:creator>
      <dc:date>2025-02-08T19:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with order and accumulated in tables</title>
      <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505066#M103890</link>
      <description>&lt;P&gt;OK&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/301563"&gt;@DeanW&lt;/a&gt;, then you have 2 issues, the sort by quantity and the fact that the accumulation doesn't accumulates different "Descripcion Material"&lt;/P&gt;
&lt;P&gt;The 2nd can be solved as I posted before: adding TOTAL to Above.&lt;/P&gt;
&lt;P&gt;The sort order it's a bit more complicated. Once you use the Above function, the sort by column doesn't works and you have to use the dimension sort by expression option. But this is applied to the values of the dimension itself.&lt;/P&gt;
&lt;P&gt;So if Golf is the value with most quantity it will go first, doesn't matter the values splitted by the second dimension, it only sorts the first dimension values.&lt;/P&gt;
&lt;P&gt;To make the second dimension count when sorting the values you need to split the first dimension values in different values for each combination of dimensions.&lt;/P&gt;
&lt;P&gt;I don't know if there is a better way but you can do this switching&amp;nbsp;"Descripcion Material" to a calculated dimension as: =Aggr(Dual("Descripcion Material",RowNo(TOTAL)),"Descripcion Material",CODIGO_MATERIAL)&lt;/P&gt;
&lt;P&gt;With this, each combination of the dimension values will get a different number and can be sorted by both dimensions.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Feb 2025 08:16:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505066#M103890</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-02-09T08:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with order and accumulated in tables</title>
      <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505211#M103919</link>
      <description>&lt;P&gt;Hi, thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;, but de not work. I write de aggr() and put the TOTAL in rowno but the problem still there. I dont know what i do. Someone have a new solution?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 15:23:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505211#M103919</guid>
      <dc:creator>DeanW</dc:creator>
      <dc:date>2025-02-10T15:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with order and accumulated in tables</title>
      <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505241#M103926</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/301563"&gt;@DeanW&lt;/a&gt;, the TOTAL should be also in the Above.&lt;/P&gt;
&lt;P&gt;And you also need the other solution to sort by quantity&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rubenmarin_0-1739209669520.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177390iFDC57E25BB15EFB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rubenmarin_0-1739209669520.png" alt="rubenmarin_0-1739209669520.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Dim1 is calculated as&amp;nbsp;=Aggr(Dual(Dim1,RowNo(TOTAL)),Dim1,Dim2)&lt;/P&gt;
&lt;P&gt;Above is:&amp;nbsp;RangeSum(Above(Sum(Value), 0, RowNo(TOTAL)))&lt;/P&gt;
&lt;P&gt;Above TOTAL is&amp;nbsp;RangeSum(Above(&lt;STRONG&gt;TOTAL&lt;/STRONG&gt; Sum(Value), 0, RowNo(TOTAL)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without the calculated dimension for Dim1 it shows as your issue with sorting:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rubenmarin_1-1739209766796.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177391i776BCD4D8F016C29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rubenmarin_1-1739209766796.png" alt="rubenmarin_1-1739209766796.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But the Above TOTAL works in both cases.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 17:51:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505241#M103926</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-02-10T17:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with order and accumulated in tables</title>
      <link>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505245#M103927</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;You Are a Genius !!! Safe my lifeee.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are right, I must use the AGGR on dimension and total in rowno() above() !!&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I’m at a loss for words to express my gratitude!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;regards!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 18:55:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problems-with-order-and-accumulated-in-tables/m-p/2505245#M103927</guid>
      <dc:creator>DeanW</dc:creator>
      <dc:date>2025-02-10T18:55:50Z</dc:date>
    </item>
  </channel>
</rss>

