<?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: Rolling 12 months for zero values question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-12-months-for-zero-values-question/m-p/389396#M145307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2013 18:16:37 GMT</pubDate>
    <dc:creator>alexis</dc:creator>
    <dc:date>2013-04-23T18:16:37Z</dc:date>
    <item>
      <title>Rolling 12 months for zero values question</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-months-for-zero-values-question/m-p/389395#M145306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following function in a chart to calculate "&lt;STRONG&gt;Rolling 12 months&lt;/STRONG&gt;" for each of the ServiceZoneCodes (see example below for Service zone 201).&lt;/P&gt;&lt;P&gt;This function works well in a well populated data set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&lt;STRONG&gt;= Rangeavg( Above (count({$&amp;lt;Year =, Month =, %PSHOrderDate =, [PSH.ServiceZoneCode]={'SE201'}&amp;gt;} DISTINCT [PSH.No]),0,12))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario where a new Service Zone (see &lt;STRONG&gt;SE203&lt;/STRONG&gt; marked in &lt;SPAN style="color: #00ff00;"&gt;GREEN&lt;/SPAN&gt; below) was introduced and, unlike the other ServiceZones it does not have enough values to make up 12 values to average, so the calculated values are not representative of the true "average".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example the value for the first month that SE203 was introduced (Oct 2011) is &lt;STRONG&gt;21 - &lt;/STRONG&gt;here it shows "&lt;STRONG&gt;2&lt;/STRONG&gt;" (see yellow highlight) because that is the average of:&lt;/P&gt;&lt;P&gt;(21 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0) /12&amp;nbsp; which is rounded up to "2"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there a way to average the previous non-zero values only?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help would be highly appreciated&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="39543" class="jive-image-thumbnail jive-image" onclick="" alt="rolling.jpg" src="https://community.qlik.com/legacyfs/online/39543_rolling.jpg" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 10:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-months-for-zero-values-question/m-p/389395#M145306</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-04-23T10:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 months for zero values question</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-months-for-zero-values-question/m-p/389396#M145307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 18:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-months-for-zero-values-question/m-p/389396#M145307</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-04-23T18:16:37Z</dc:date>
    </item>
  </channel>
</rss>

