<?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: Data editor: sum over last 14 values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2509463#M104719</link>
    <description>&lt;DIV&gt;Your solution will probably work fine, if you format the date as an integer number: Num(Date). A different way to do it could be:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;tmpVisitors:&lt;/DIV&gt;&lt;DIV&gt;Load Date, Location, NumberOfVisitors&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;From visitors (qvd);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Visitors:&lt;/DIV&gt;&lt;DIV&gt;Load Date, Location, NumberOfVisitors,&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NumberOfVisitors +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If(Location=Peek(Location,-1),Peek(NumberOfVisitors,-1),0) +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If(Location=Peek(Location,-2),Peek(NumberOfVisitors,-2),0) +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If(Location=Peek(Location,-13),Peek(NumberOfVisitors,-13),0) as NumberOfVisitorsLast14Days&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Resident tmpVisitors&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Order By Location, Date;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Drop Table tmpVisitors;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2025 10:55:38 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2025-03-12T10:55:38Z</dc:date>
    <item>
      <title>Data editor: sum over last 14 values</title>
      <link>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2508958#M104623</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm using Qlik Sense November 2024.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I load data from excel sheets, that look the following:&lt;/P&gt;
&lt;H6&gt;Date, Location, NumberOfVisitors&lt;/H6&gt;
&lt;H6&gt;01.01.2025, Berlin, 3000&lt;/H6&gt;
&lt;H6&gt;01.01.2025, Munich, 4000&lt;/H6&gt;
&lt;H6&gt;02.01.2024, Berlin, 1900&lt;/H6&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After loading I want to add a column where the sum of visitors of the last 14 days per location is shown:&lt;/P&gt;
&lt;H6&gt;Date, Location, NumberOfVisitors, NumberOfVisitorsLast14Days&lt;/H6&gt;
&lt;H6&gt;01.01.2025, Berlin, 3000, &lt;EM&gt;[number of visitors from 18.-31.12.2024]&lt;/EM&gt; 40000&lt;/H6&gt;
&lt;H6&gt;01.01.2025, Munich, 4000,&lt;EM&gt; [number of visitors from 18.-31.12.2024]&lt;/EM&gt; 48000&lt;/H6&gt;
&lt;H6&gt;02.01.2024, Berlin, 1900,&amp;nbsp;&lt;EM&gt;[number of visitors from 19.12.2024-01.01.2025]&lt;/EM&gt; 39500&lt;/H6&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What formula do I have to use?&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 09:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2508958#M104623</guid>
      <dc:creator>QlikCommSa</dc:creator>
      <dc:date>2025-03-10T09:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data editor: sum over last 14 values</title>
      <link>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2508994#M104633</link>
      <description>&lt;P&gt;use below expression.&lt;/P&gt;
&lt;P&gt;rangesum(above(aggr(Sum(&lt;SPAN&gt;NumberOfVisitors&lt;/SPAN&gt;),Date),0,14))&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 11:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2508994#M104633</guid>
      <dc:creator>Padma123</dc:creator>
      <dc:date>2025-03-10T11:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Data editor: sum over last 14 values</title>
      <link>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2509009#M104638</link>
      <description>&lt;P&gt;Hi Padma,&lt;/P&gt;
&lt;P&gt;thanks for your quick reply!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't use this expression in data editor. I need to have a solution for my Qlik Sense script.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 12:12:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2509009#M104638</guid>
      <dc:creator>QlikCommSa</dc:creator>
      <dc:date>2025-03-10T12:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Data editor: sum over last 14 values</title>
      <link>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2509432#M104716</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;since I had to find a solution now, I did the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;VisitorMap:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Mapping&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load Date &amp;amp; '-' Location as Key,&amp;nbsp;NumberOfVisitors&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from visitors (qvd);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;visitors:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;noconcatenate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load Date, Location, NumberOfVisitors,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ApplyMap('VisitorMap',Date-1 &amp;amp; '-' Location) +&amp;nbsp;ApplyMap('VisitorMap',Date-2 &amp;amp; '-' Location) + ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from visitors (qvd);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Any comments or critics for this solution?&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 08:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2509432#M104716</guid>
      <dc:creator>QlikCommSa</dc:creator>
      <dc:date>2025-03-12T08:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Data editor: sum over last 14 values</title>
      <link>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2509463#M104719</link>
      <description>&lt;DIV&gt;Your solution will probably work fine, if you format the date as an integer number: Num(Date). A different way to do it could be:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;tmpVisitors:&lt;/DIV&gt;&lt;DIV&gt;Load Date, Location, NumberOfVisitors&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;From visitors (qvd);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Visitors:&lt;/DIV&gt;&lt;DIV&gt;Load Date, Location, NumberOfVisitors,&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NumberOfVisitors +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If(Location=Peek(Location,-1),Peek(NumberOfVisitors,-1),0) +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If(Location=Peek(Location,-2),Peek(NumberOfVisitors,-2),0) +&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If(Location=Peek(Location,-13),Peek(NumberOfVisitors,-13),0) as NumberOfVisitorsLast14Days&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Resident tmpVisitors&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Order By Location, Date;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Drop Table tmpVisitors;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 10:55:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-editor-sum-over-last-14-values/m-p/2509463#M104719</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2025-03-12T10:55:38Z</dc:date>
    </item>
  </channel>
</rss>

