<?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: Averages in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400664#M1159931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If u have a date field then use below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales=Sum(Sales)&lt;/P&gt;&lt;P&gt;current number of months=month(max(Datefield))-month(min(Datefield))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Kabilan K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2013 06:20:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-01-08T06:20:05Z</dc:date>
    <item>
      <title>Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400662#M1159928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to write an expression that extrapolates a period of data over a full year e.g. (sales /current number of months)x 12. I am struggling to do this so when I select a month the expression automatically changes e.g. August 2012 is selected the calculation would be (August 2012 YTD sales/8)x12. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 16:49:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400662#M1159928</guid>
      <dc:creator />
      <dc:date>2013-01-07T16:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400663#M1159929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In what format is your month data stored? If it is a date field, you could use the Month() function to get the number of the month to use in the denominator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, you will need to turn the text field containing the month back into a date using the date#() function, then use the month() around it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg =month(date#('August 2012','MMMM YYYY'))*1 returns '8'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do let me know if this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 21:25:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400663#M1159929</guid>
      <dc:creator />
      <dc:date>2013-01-07T21:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400664#M1159931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If u have a date field then use below logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales=Sum(Sales)&lt;/P&gt;&lt;P&gt;current number of months=month(max(Datefield))-month(min(Datefield))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Kabilan K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 06:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400664#M1159931</guid>
      <dc:creator />
      <dc:date>2013-01-08T06:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400665#M1159932</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;&lt;STRONG&gt;=month(max(Datefield))-month(min(Datefield))&amp;nbsp;&amp;nbsp; // &lt;/STRONG&gt;it&lt;STRONG&gt; won't&lt;/STRONG&gt; return correct value for some scenario(Month('01/08/2013')-month('03/21/2012')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I have changed the expression like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;current number of months=ceil((MonthName(&lt;STRONG&gt;max(Datefield)&lt;/STRONG&gt;)-MonthName(&lt;STRONG&gt;min(Datefield)&lt;/STRONG&gt;))/30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Kabilan K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 06:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400665#M1159932</guid>
      <dc:creator />
      <dc:date>2013-01-08T06:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400666#M1159933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help with this, I used - month(date#(Seldate,'MMMM YYYY'))*1which worked until there was no data for the selected month, when this happened no figures were returned. Do you know a way to rectify this issue? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Tom &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 11:28:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400666#M1159933</guid>
      <dc:creator />
      <dc:date>2013-01-08T11:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400667#M1159934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not a problem. What expression are you using for the YTD sales? Is this something already stored in a column or are you calculating this via another expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 19:19:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400667#M1159934</guid>
      <dc:creator />
      <dc:date>2013-01-08T19:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400668#M1159935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calculating this in the same expression, however I was using sales as an example the actual calculation is as below. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;SelDate={"&amp;gt;=$(=date(yearstart(max(SelDate)),'MMMM YYYY')) &amp;lt;=$(=date(max(SelDate),'MMMM YYYY'))"}, [Fee Group]={ &lt;EM&gt;Various fee types &lt;/EM&gt;}&amp;gt;}[Base Currency Amount (USD)]) &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Tom &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2013 09:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400668#M1159935</guid>
      <dc:creator />
      <dc:date>2013-01-09T09:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400669#M1159936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And have you tested the bit separately? Does the YTD bit work on it's own?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just trying to figure out which bit is the issue &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2013 20:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400669#M1159936</guid>
      <dc:creator />
      <dc:date>2013-01-10T20:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400670#M1159937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tested the YTD separatly and it does work on its own. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 09:35:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400670#M1159937</guid>
      <dc:creator />
      <dc:date>2013-01-14T09:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Averages</title>
      <link>https://community.qlik.com/t5/QlikView/Averages/m-p/400671#M1159938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; In which field is the missing data that causes the problem? Is it Seldate itself or in a separate field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 20:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Averages/m-p/400671#M1159938</guid>
      <dc:creator />
      <dc:date>2013-01-14T20:40:01Z</dc:date>
    </item>
  </channel>
</rss>

