<?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: Help with average in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306115#M826882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you create a "MonthYear" Column in the back end with MMM-YYYY format? Then you can use the below expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Avg({$&amp;lt;MonthYear -={"$(=Date(MonthStart(Today()), 'MMM-YYYY'))"}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the script I used:&lt;/P&gt;&lt;P&gt;//Temp Table&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[Date, Sales&lt;/P&gt;&lt;P&gt;1/1/2017,10&lt;/P&gt;&lt;P&gt;2/2/2017,10&lt;/P&gt;&lt;P&gt;3/3/2017,10&lt;/P&gt;&lt;P&gt;4/4/2017,10&lt;/P&gt;&lt;P&gt;5/5/2017,10&lt;/P&gt;&lt;P&gt;6/6/2017,10&lt;/P&gt;&lt;P&gt;7/7/2017,2];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Resident load with MonthYear Column&lt;/P&gt;&lt;P&gt;test1:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;month(Date)&amp;amp;'-'&amp;amp;year(Date) as MonthYear,&lt;/P&gt;&lt;P&gt;Sales &lt;/P&gt;&lt;P&gt;resident test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// drop temp table&lt;/P&gt;&lt;P&gt;drop table test;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;Result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" height="52" src="https://community.qlik.com/legacyfs/online/170188_Capture.PNG" style="font-size: 13.3333px; width: 197px; height: 51.9504px;" width="197" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;Manas&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jul 2017 00:00:50 GMT</pubDate>
    <dc:creator>manas_bn</dc:creator>
    <dc:date>2017-07-14T00:00:50Z</dc:date>
    <item>
      <title>Help with average</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306114#M826881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get the average of Total_F for the year, NOT including this month.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="average.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/170205_average.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct number I need to achieve is:&amp;nbsp; 306,922&lt;/P&gt;&lt;P&gt;It is also including the 0 and making my answer 245,538&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need some help getting current year, excluding current month. Here is what I am trying. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(Avg({$&amp;lt;Month = {"$(!=Month(Today()))"}, Year = {"$(=Year(Today()))"}&amp;gt;} Total_F))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306114#M826881</guid>
      <dc:creator>joshrussin</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with average</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306115#M826882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you create a "MonthYear" Column in the back end with MMM-YYYY format? Then you can use the below expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Avg({$&amp;lt;MonthYear -={"$(=Date(MonthStart(Today()), 'MMM-YYYY'))"}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the script I used:&lt;/P&gt;&lt;P&gt;//Temp Table&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;[Date, Sales&lt;/P&gt;&lt;P&gt;1/1/2017,10&lt;/P&gt;&lt;P&gt;2/2/2017,10&lt;/P&gt;&lt;P&gt;3/3/2017,10&lt;/P&gt;&lt;P&gt;4/4/2017,10&lt;/P&gt;&lt;P&gt;5/5/2017,10&lt;/P&gt;&lt;P&gt;6/6/2017,10&lt;/P&gt;&lt;P&gt;7/7/2017,2];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Resident load with MonthYear Column&lt;/P&gt;&lt;P&gt;test1:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;month(Date)&amp;amp;'-'&amp;amp;year(Date) as MonthYear,&lt;/P&gt;&lt;P&gt;Sales &lt;/P&gt;&lt;P&gt;resident test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// drop temp table&lt;/P&gt;&lt;P&gt;drop table test;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;Result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" height="52" src="https://community.qlik.com/legacyfs/online/170188_Capture.PNG" style="font-size: 13.3333px; width: 197px; height: 51.9504px;" width="197" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: inherit; font-size: inherit;"&gt;Manas&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 00:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306115#M826882</guid>
      <dc:creator>manas_bn</dc:creator>
      <dc:date>2017-07-14T00:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with average</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306116#M826883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg({$&amp;lt;[Non Service_F] = {"$(='&amp;gt;=' &amp;amp; Date(YearStart(Max([Non Service_F])), 'M/D/YYYY') &amp;amp; '&amp;lt;' &amp;amp; Date(MonthStart(Max([Non Service_F])), 'M/D/YYYY'))"}, Month, Year&amp;gt;} Total_F)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 00:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306116#M826883</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-14T00:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with average</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306117#M826884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This expression should work: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg({&amp;lt;[Non Service_F]={"&amp;lt;$(=DATE(MonthStart(Today(1))))"}&amp;gt;}Total_F)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 00:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306117#M826884</guid>
      <dc:creator>jcampbell474</dc:creator>
      <dc:date>2017-07-14T00:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with average</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306118#M826885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;"Monthval"&amp;nbsp; is calculated column contains month names in "MMM" format.Basically comparing the same values in set analysis&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Avg( {$ &amp;lt; Monthval -={"$(=Date(Max(Non_Service_F),'MMM'))"}&amp;nbsp; &amp;gt;} Total_F).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;find the below link for more details.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4424"&gt;Excluding values in Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 00:38:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-average/m-p/1306118#M826885</guid>
      <dc:creator>satishsure</dc:creator>
      <dc:date>2017-07-14T00:38:09Z</dc:date>
    </item>
  </channel>
</rss>

