<?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 Rank Periods in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-Periods/m-p/875880#M470254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to calculate a rolling average over 6 periods. I have implemented a rangesum calculation that works well, but the problem is that if it is the first period, I would like to write an if statement that there is only one period and thus QV must only divide by 1 if it is the second period, it must divide by 2 and from 3 periods onwards it can divide by 3...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula that I have implemented looks as follows:&lt;/P&gt;&lt;P&gt;(sum(m1_total_revenue) + rangesum(above(sum(m1_total_revenue),1,1)) + rangesum(above(sum(m1_total_revenue),2,1)))/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is in a pivot table that has been set out per period..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your assistance,&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2015 06:51:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-29T06:51:30Z</dc:date>
    <item>
      <title>Rank Periods</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-Periods/m-p/875880#M470254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to calculate a rolling average over 6 periods. I have implemented a rangesum calculation that works well, but the problem is that if it is the first period, I would like to write an if statement that there is only one period and thus QV must only divide by 1 if it is the second period, it must divide by 2 and from 3 periods onwards it can divide by 3...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula that I have implemented looks as follows:&lt;/P&gt;&lt;P&gt;(sum(m1_total_revenue) + rangesum(above(sum(m1_total_revenue),1,1)) + rangesum(above(sum(m1_total_revenue),2,1)))/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is in a pivot table that has been set out per period..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your assistance,&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 06:51:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-Periods/m-p/875880#M470254</guid>
      <dc:creator />
      <dc:date>2015-05-29T06:51:30Z</dc:date>
    </item>
  </channel>
</rss>

