<?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: Weighted average for every quarter using the last 4 quarters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425165#M695481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, it works fine, but now another question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we have another date with change - let's say 21/03/2013 - number= 77&lt;/P&gt;&lt;P&gt;how to calculate the weighted average in qv script for the quarter/s??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regadrs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 May 2013 07:03:12 GMT</pubDate>
    <dc:creator>ivan_will</dc:creator>
    <dc:date>2013-05-31T07:03:12Z</dc:date>
    <item>
      <title>Weighted average for every quarter using the last 4 quarters</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425163#M695479</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;please find attached an xls file with an example in it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the idea is as follows: &lt;/P&gt;&lt;P&gt;for every quarter, for every ID I want to have weighted average Number - so for 31/03/2013 it should be the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Number*daysInQuarter&amp;nbsp; (31/03/2013) +&amp;nbsp; &lt;/P&gt;&lt;P&gt;Number*daysInQuarter&amp;nbsp; (31/12/2012) +&amp;nbsp; &lt;/P&gt;&lt;P&gt;Number*daysInQuarter&amp;nbsp; (30/09/2012) +&amp;nbsp; &lt;/P&gt;&lt;P&gt;Number*daysInQuarter&amp;nbsp; (30/06/2012)) /&amp;nbsp; (90+92+92+91) = 75&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the previous it should be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Number*daysInQuarter&amp;nbsp; (31/12/2012) +&amp;nbsp; &lt;/P&gt;&lt;P&gt;Number*daysInQuarter&amp;nbsp; (30/09/2012) +&amp;nbsp; &lt;/P&gt;&lt;P&gt;Number*daysInQuarter&amp;nbsp; (30/06/2012) +&amp;nbsp; &lt;/P&gt;&lt;P&gt;Number*daysInQuarter&amp;nbsp; (31/03/2012)) /&amp;nbsp; (92+92+91+91) = 65&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want to have this &lt;STRONG&gt;in the script&lt;/STRONG&gt; - the same as the below table. So if you have something similar it would be a help. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 966px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" width="101"&gt;ID&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="119"&gt;Date&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="101"&gt;Number&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="127"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="96"&gt; &lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;" width="99"&gt; &lt;/TD&gt;&lt;TD class="xl63" width="121"&gt;daysInQuarter&lt;/TD&gt;&lt;TD class="xl74" width="118"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;31/03/2011&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;89&lt;/TD&gt;&lt;TD align="center"&gt;#VALUE!&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;30/06/2011&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;91&lt;/TD&gt;&lt;TD align="center"&gt;#VALUE!&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;30/09/2011&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;92&lt;/TD&gt;&lt;TD align="center"&gt;#VALUE!&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;31/12/2011&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;92&lt;/TD&gt;&lt;TD align="right"&gt;25.13736264&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;31/03/2012&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;91&lt;/TD&gt;&lt;TD align="right"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;30/06/2012&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top: none; border-left: none;"&gt;60&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;91&lt;/TD&gt;&lt;TD align="right"&gt;44.94535519&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;30/09/2012&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-top: none; border-left: none;"&gt;70&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;92&lt;/TD&gt;&lt;TD align="right"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;31/12/2012&lt;/TD&gt;&lt;TD align="right" class="xl72" style="border-top: none; border-left: none;"&gt;80&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;92&lt;/TD&gt;&lt;TD align="right"&gt;65.05464481&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;we&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;31/03/2013&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;90&lt;/TD&gt;&lt;TD align="right"&gt;74.95890411&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 13:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425163#M695479</guid>
      <dc:creator>ivan_will</dc:creator>
      <dc:date>2013-05-30T13:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average for every quarter using the last 4 quarters</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425164#M695480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 13:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425164#M695480</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-30T13:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average for every quarter using the last 4 quarters</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425165#M695481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, it works fine, but now another question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we have another date with change - let's say 21/03/2013 - number= 77&lt;/P&gt;&lt;P&gt;how to calculate the weighted average in qv script for the quarter/s??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regadrs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 07:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425165#M695481</guid>
      <dc:creator>ivan_will</dc:creator>
      <dc:date>2013-05-31T07:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average for every quarter using the last 4 quarters</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425166#M695482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 12:15:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-average-for-every-quarter-using-the-last-4-quarters/m-p/425166#M695482</guid>
      <dc:creator>ivan_will</dc:creator>
      <dc:date>2013-05-31T12:15:30Z</dc:date>
    </item>
  </channel>
</rss>

