<?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: Create Cumulative numbers in load script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700210#M53632</link>
    <description>&lt;P&gt;and remenber that you are summing a field with cumulated value, u can't use that to total calculation.&lt;/P&gt;&lt;P&gt;Add this to the script:&lt;/P&gt;&lt;P&gt;left Join&lt;BR /&gt;load max(TransValueDate) as TransValueDate,&lt;BR /&gt;BUnit,&lt;BR /&gt;TransCcy,&lt;BR /&gt;1 as max_data&lt;BR /&gt;Resident Transactions1&lt;BR /&gt;Group by BUnit,&lt;BR /&gt;TransCcy;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and use this measure in my pivot:&lt;/P&gt;&lt;P&gt;if (Dimensionality()&amp;lt;=1, sum(aggr(Sum({&amp;lt;max_data={1}&amp;gt;}Trans_CUM),BUnit,TransCcy)), Sum(Trans_CUM))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached all file&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2020 13:01:40 GMT</pubDate>
    <dc:creator>DesmoArka</dc:creator>
    <dc:date>2020-05-08T13:01:40Z</dc:date>
    <item>
      <title>Create cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699766#M53590</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to get cumulative numbers in the load script like I have calculated using rangesum in the table below.&lt;/P&gt;&lt;P&gt;You can find attached the app and the data.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikecherry_0-1588851022841.png" style="width: 838px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33113iCEF8D7E29BECF9E9/image-dimensions/838x417?v=v2" width="838" height="417" role="button" title="mikecherry_0-1588851022841.png" alt="mikecherry_0-1588851022841.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699766#M53590</guid>
      <dc:creator>mikecherry</dc:creator>
      <dc:date>2024-11-16T18:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create **bleep** numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699771#M53591</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;have you try with peek function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;tab:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;date, value&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;1, 3&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2, 4&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;3, 3&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;4, 5&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;5, 7&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;6, 1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;cumulate:&lt;BR /&gt;LOAD&lt;BR /&gt;date,&lt;BR /&gt;value,&lt;BR /&gt;&lt;EM&gt;RangeSum(value,Peek(cumul,-1)) as cumul&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Resident tab&lt;BR /&gt;&lt;EM&gt;Order by date asc;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table tab;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this help you&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699771#M53591</guid>
      <dc:creator>DesmoArka</dc:creator>
      <dc:date>2020-05-07T12:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create **bleep** numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699772#M53592</link>
      <description>&lt;P&gt;Yes but it doesn't give me the right number as I have also two other dimensions I need to consider (Entity and Currency)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699772#M53592</guid>
      <dc:creator>mikecherry</dc:creator>
      <dc:date>2020-05-07T12:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create **bleep** numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699781#M53593</link>
      <description>&lt;P&gt;if you have more aggr dimension you have to check if the actual row is equal to previous one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tab:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;entity, date, value&lt;BR /&gt;a, 1, 3&lt;BR /&gt;a, 2, 4&lt;BR /&gt;a, 3, 3&lt;BR /&gt;b, 4, 5&lt;BR /&gt;b, 5, 7&lt;BR /&gt;b, 6, 1&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;cumulate:&lt;BR /&gt;LOAD&lt;BR /&gt;entity,&lt;BR /&gt;date,&lt;BR /&gt;value,&lt;BR /&gt;if(Peek(entity,-1)&amp;lt;&amp;gt; entity,value, RangeSum(value,Peek(cumul,-1))) as cumul&lt;/P&gt;&lt;P&gt;Resident tab&lt;BR /&gt;Order by entity,date asc;&lt;/P&gt;&lt;P&gt;DROP Table tab;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DesmoArka_0-1588854301329.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33118i2687748356537126/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DesmoArka_0-1588854301329.png" alt="DesmoArka_0-1588854301329.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:25:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699781#M53593</guid>
      <dc:creator>DesmoArka</dc:creator>
      <dc:date>2020-05-07T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create **bleep** numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699793#M53595</link>
      <description>&lt;P&gt;maybe this is what you want:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tab:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;entity, date, value,currency&lt;BR /&gt;a, 1, 3, e&lt;BR /&gt;a, 2, 4, d&lt;BR /&gt;a, 3, 3, d&lt;BR /&gt;a, 3, 3, e&lt;BR /&gt;a, 3, 3, e&lt;BR /&gt;b, 4, 5, d&lt;BR /&gt;b, 5, 7, d&lt;BR /&gt;b, 6, 1, e&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;cumulate:&lt;BR /&gt;LOAD&lt;BR /&gt;entity,&lt;BR /&gt;date,&lt;BR /&gt;value,&lt;BR /&gt;currency,&lt;BR /&gt;if(Peek(entity,-1)&amp;lt;&amp;gt; entity or Peek(currency,-1)&amp;lt;&amp;gt; currency, value , RangeSum( value, Peek(cumul,-1))) as cumul&lt;BR /&gt;Resident tab&lt;BR /&gt;Order by entity,currency,date asc;&lt;/P&gt;&lt;P&gt;DROP Table tab;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DesmoArka_0-1588855453954.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33119i0F7917EE8E75C9AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DesmoArka_0-1588855453954.png" alt="DesmoArka_0-1588855453954.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See you.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699793#M53595</guid>
      <dc:creator>DesmoArka</dc:creator>
      <dc:date>2020-05-07T12:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699835#M53597</link>
      <description>&lt;P&gt;use&amp;nbsp;this in back end script , peek function can use data from memory unlike previous function.&lt;/P&gt;&lt;P&gt;alt(Peek (&lt;SPAN&gt;cumul&lt;/SPAN&gt;)+&lt;SPAN&gt;value&amp;nbsp;&lt;/SPAN&gt;,&lt;SPAN&gt;value&amp;nbsp;&lt;/SPAN&gt;) as &lt;SPAN&gt;cumul&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 13:42:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1699835#M53597</guid>
      <dc:creator>IamAlbinAntony</dc:creator>
      <dc:date>2020-05-07T13:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700163#M53624</link>
      <description>&lt;P&gt;I don't know if you guys can spot something wrong but it doesn't want to work...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikecherry_0-1588930738986.png" style="width: 770px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33201i9B04444B074D8942/image-dimensions/770x285?v=v2" width="770" height="285" role="button" title="mikecherry_0-1588930738986.png" alt="mikecherry_0-1588930738986.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Snip of the pivot showing first lines.. it works at the beginning but as soon another currency comes in the numbers go crazy. Column in the middle is Rangesum in the object and the column on the right is Sum(Trans_Cumulative)..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikecherry_1-1588930900866.png" style="width: 915px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33202i18AAF9B030D1E82E/image-dimensions/915x286?v=v2" width="915" height="286" role="button" title="mikecherry_1-1588930900866.png" alt="mikecherry_1-1588930900866.png" /&gt;&lt;/span&gt;&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, 08 May 2020 09:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700163#M53624</guid>
      <dc:creator>mikecherry</dc:creator>
      <dc:date>2020-05-08T09:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700164#M53625</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;in your image i don't see order by in load, may you post that?&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 09:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700164#M53625</guid>
      <dc:creator>DesmoArka</dc:creator>
      <dc:date>2020-05-08T09:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700185#M53627</link>
      <description>&lt;P&gt;Here you go &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikecherry_0-1588937743747.png" style="width: 970px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33203i20559F9D0D571375/image-dimensions/970x394?v=v2" width="970" height="394" role="button" title="mikecherry_0-1588937743747.png" alt="mikecherry_0-1588937743747.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 11:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700185#M53627</guid>
      <dc:creator>mikecherry</dc:creator>
      <dc:date>2020-05-08T11:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700188#M53628</link>
      <description>&lt;P&gt;If you check the app I have just created, which is really similar to my scenario it doesn't work either.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 11:49:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700188#M53628</guid>
      <dc:creator>mikecherry</dc:creator>
      <dc:date>2020-05-08T11:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700197#M53629</link>
      <description>&lt;P&gt;I use your script at all.&lt;/P&gt;&lt;P&gt;I thing you are wrong only graph and not script.&lt;/P&gt;&lt;P&gt;Create this pivot and check if it's ok:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DesmoArka_0-1588940940785.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33207i5918241B558A64CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DesmoArka_0-1588940940785.png" alt="DesmoArka_0-1588940940785.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You must have Bunit in Graph&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 12:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700197#M53629</guid>
      <dc:creator>DesmoArka</dc:creator>
      <dc:date>2020-05-08T12:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700201#M53630</link>
      <description>&lt;P&gt;This is my file.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 12:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700201#M53630</guid>
      <dc:creator>DesmoArka</dc:creator>
      <dc:date>2020-05-08T12:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700210#M53632</link>
      <description>&lt;P&gt;and remenber that you are summing a field with cumulated value, u can't use that to total calculation.&lt;/P&gt;&lt;P&gt;Add this to the script:&lt;/P&gt;&lt;P&gt;left Join&lt;BR /&gt;load max(TransValueDate) as TransValueDate,&lt;BR /&gt;BUnit,&lt;BR /&gt;TransCcy,&lt;BR /&gt;1 as max_data&lt;BR /&gt;Resident Transactions1&lt;BR /&gt;Group by BUnit,&lt;BR /&gt;TransCcy;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and use this measure in my pivot:&lt;/P&gt;&lt;P&gt;if (Dimensionality()&amp;lt;=1, sum(aggr(Sum({&amp;lt;max_data={1}&amp;gt;}Trans_CUM),BUnit,TransCcy)), Sum(Trans_CUM))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached all file&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2020 13:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700210#M53632</guid>
      <dc:creator>DesmoArka</dc:creator>
      <dc:date>2020-05-08T13:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create Cumulative numbers in load script</title>
      <link>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700975#M53671</link>
      <description>&lt;P&gt;Thank you man ! In the end I had to do a group by before your script as I had multiple transactions at the same date but after that I have used your script and works great !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michele&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 08:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-cumulative-numbers-in-load-script/m-p/1700975#M53671</guid>
      <dc:creator>mikecherry</dc:creator>
      <dc:date>2020-05-12T08:09:16Z</dc:date>
    </item>
  </channel>
</rss>

