<?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 AVERAGE FUNCTION in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/AVERAGE-FUNCTION/m-p/1981561#M80997</link>
    <description>&lt;P&gt;Hey guys !&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was wondering how to write function (in front or in data load editor) that will calculate average spending of Customer BUT starting to count months from the first transaction customer made;&amp;nbsp;&lt;BR /&gt;basic easy example in printScreen Below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ena1309_0-1663250003655.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/89199iB2DF7FCFACCDC180/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ena1309_0-1663250003655.png" alt="ena1309_0-1663250003655.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 13:53:55 GMT</pubDate>
    <dc:creator>ena1309</dc:creator>
    <dc:date>2022-09-15T13:53:55Z</dc:date>
    <item>
      <title>AVERAGE FUNCTION</title>
      <link>https://community.qlik.com/t5/App-Development/AVERAGE-FUNCTION/m-p/1981561#M80997</link>
      <description>&lt;P&gt;Hey guys !&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was wondering how to write function (in front or in data load editor) that will calculate average spending of Customer BUT starting to count months from the first transaction customer made;&amp;nbsp;&lt;BR /&gt;basic easy example in printScreen Below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ena1309_0-1663250003655.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/89199iB2DF7FCFACCDC180/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ena1309_0-1663250003655.png" alt="ena1309_0-1663250003655.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 13:53:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AVERAGE-FUNCTION/m-p/1981561#M80997</guid>
      <dc:creator>ena1309</dc:creator>
      <dc:date>2022-09-15T13:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: AVERAGE FUNCTION</title>
      <link>https://community.qlik.com/t5/App-Development/AVERAGE-FUNCTION/m-p/1983891#M81171</link>
      <description>&lt;P&gt;Hello Ena,&lt;/P&gt;
&lt;P&gt;Your snapshot is missing customer identifier, so I added one.&lt;/P&gt;
&lt;P&gt;You can get average in script as below:&lt;/P&gt;
&lt;P&gt;Data:&lt;BR /&gt;LOAD customer, sum(spend) / (max(customerCounter) - min(if(spend&amp;gt;0,customerCounter))+1) as average group by customer;&lt;BR /&gt;LOAD customer, month, spend, AutoNumber(recno(),customer) as customerCounter&lt;BR /&gt;INLINE [&lt;BR /&gt;customer, month, spend&lt;BR /&gt;1,Jan,0&lt;BR /&gt;1,Feb,0&lt;BR /&gt;1,Mar,0&lt;BR /&gt;1,Apr,100&lt;BR /&gt;1,May,0&lt;BR /&gt;1,Jun,200&lt;BR /&gt;1,Jul,150&lt;BR /&gt;1,Aug,0&lt;BR /&gt;1,Sep,0&lt;BR /&gt;1,Oct,100&lt;BR /&gt;1,Nov,200&lt;BR /&gt;1,Dec,0&lt;BR /&gt;1,Jan,100&lt;BR /&gt;1,Feb,0&lt;BR /&gt;1,Mar,0&lt;BR /&gt;1,Apr,0&lt;BR /&gt;2,Jan,0&lt;BR /&gt;2,Feb,50&lt;BR /&gt;2,Mar,0&lt;BR /&gt;2,Apr,50&lt;BR /&gt;2,May,0&lt;BR /&gt;2,Jun,100&lt;BR /&gt;2,Jul,50&lt;BR /&gt;2,Aug,0&lt;BR /&gt;2,Sep,0&lt;BR /&gt;2,Oct,200&lt;BR /&gt;2,Nov,100&lt;BR /&gt;2,Dec,0&lt;BR /&gt;2,Jan,100&lt;BR /&gt;2,Feb,400&lt;BR /&gt;2,Mar,0&lt;BR /&gt;2,Apr,50&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 19:52:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AVERAGE-FUNCTION/m-p/1983891#M81171</guid>
      <dc:creator>SerhanKaraer</dc:creator>
      <dc:date>2022-09-21T19:52:47Z</dc:date>
    </item>
  </channel>
</rss>

