<?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 Calculating an average in a straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212884#M66746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DV&lt;/P&gt;&lt;P&gt;Simple eh ? lol&lt;/P&gt;&lt;P&gt;Many thanks this works well.&lt;/P&gt;&lt;P&gt;Darrell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 11:30:30 GMT</pubDate>
    <dc:creator>darrellbutler</dc:creator>
    <dc:date>2011-04-13T11:30:30Z</dc:date>
    <item>
      <title>Calculating an average in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212882#M66744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0636.example.xls:550:0]&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to replicate the above task from Excel into Qlikview.&lt;/P&gt;&lt;P&gt;The data in grey already exists in my datamodel and can be viewed in my straight table, the issues i'm facing are:&lt;/P&gt;&lt;P&gt;How do I insert future dates that don't exist in the source database, and&lt;/P&gt;&lt;P&gt;What formula would I use to work out the forecast production ?&lt;/P&gt;&lt;P&gt;The forecast is based on an average of the production dates 6,8 &amp;amp; 10 days ago.&lt;/P&gt;&lt;P&gt;I've been using a combination of range average and above functions but I'm struggling to come up with an average for a non continous date range.&lt;/P&gt;&lt;P&gt;Kind Rgds&lt;/P&gt;&lt;P&gt;Darrell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 09:17:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212882#M66744</guid>
      <dc:creator>darrellbutler</dc:creator>
      <dc:date>2011-04-13T09:17:30Z</dc:date>
    </item>
    <item>
      <title>Calculating an average in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212883#M66745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darrell,&lt;/P&gt;&lt;P&gt;Do you have the QV document with sample data? That would be really helpful to answer your question. However you can achieve this ask by using Set Analysis Expression.&lt;/P&gt;&lt;P&gt;Here is the idea...&lt;/P&gt;&lt;P&gt;Declare 3 variables something like this..&lt;/P&gt;&lt;P&gt;vSixDayBack : &lt;B&gt;(Avg({$&amp;lt;[Production Date] = ([Production Date] - 6)&amp;gt;} [Units Produced]))&lt;/B&gt;&lt;/P&gt;&lt;P&gt;vEightDayBack : &lt;B&gt;(Avg({$&amp;lt;[Production Date] = ([Production Date] - 8)&amp;gt;} [Units Produced]))&lt;/B&gt;&lt;/P&gt;&lt;P&gt;vTenDayBack : &lt;B&gt;(Avg({$&amp;lt;[Production Date] = ([Production Date] - 10)&amp;gt;} [Units Produced]))&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use the RangeAvg function and call the 3 variables...&lt;/P&gt;&lt;P&gt;RangeAvg($(vSixDayBack), $(vEightDayBack), $(vTenDayBack))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 10:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212883#M66745</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-04-13T10:38:19Z</dc:date>
    </item>
    <item>
      <title>Calculating an average in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212884#M66746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DV&lt;/P&gt;&lt;P&gt;Simple eh ? lol&lt;/P&gt;&lt;P&gt;Many thanks this works well.&lt;/P&gt;&lt;P&gt;Darrell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 11:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212884#M66746</guid>
      <dc:creator>darrellbutler</dc:creator>
      <dc:date>2011-04-13T11:30:30Z</dc:date>
    </item>
    <item>
      <title>Calculating an average in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212885#M66747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darrell,&lt;/P&gt;&lt;P&gt;Yeah! straight forward but not very simple. I am learning a lot by answering the posts on this forum. Can't believe its just 6 weeks since I started using QV. Unbelievable isn't it!!!&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 11:42:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212885#M66747</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-04-13T11:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating an average in a straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212886#M66748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt; Im trying to use this myself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vDayBackOne&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;{$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[FinancialWeek]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[FinancialWeek]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; - 1)&amp;gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[SalesRetailGross]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; in my script but Im getting an error in my script arouns the dollar sign and curly bracket - Can you see whats wrong with it at all?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Jo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 10:31:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-an-average-in-a-straight-table/m-p/212886#M66748</guid>
      <dc:creator />
      <dc:date>2013-01-15T10:31:24Z</dc:date>
    </item>
  </channel>
</rss>

