<?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: SET expression give YTD value , How to make it Average amount ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117092#M630732</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much your expression work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2016 02:20:18 GMT</pubDate>
    <dc:creator>paulyeo11</dc:creator>
    <dc:date>2016-08-03T02:20:18Z</dc:date>
    <item>
      <title>SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117088#M630728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below expression from Ruben , work fine&amp;nbsp; , which give the current select date aR amount :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -0))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -0))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to modify the above expression to get the average value of aR , to make it display -5,234,734&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Table 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YearMonth "Jun-2016&lt;/P&gt;&lt;P&gt;(S$K)"&lt;/P&gt;&lt;P&gt;June -4,619,754&lt;/P&gt;&lt;P&gt;May -5,286,254&lt;/P&gt;&lt;P&gt;Apr -5,702,825&lt;/P&gt;&lt;P&gt;Mar -5,627,692&lt;/P&gt;&lt;P&gt;Feb -5,256,865&lt;/P&gt;&lt;P&gt;Jan -4,915,070&lt;/P&gt;&lt;P&gt;Total -31,408,460&lt;/P&gt;&lt;P&gt;no of mth 6&lt;/P&gt;&lt;P&gt;Average -5,234,743&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i Try add AVG at the expression , it does not work :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AVG(&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -0))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -0))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope some one can advise me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 01:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117088#M630728</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-08-03T01:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117089#M630729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 01:05:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117089#M630729</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-08-03T01:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117090#M630730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works, but I am not sure if this is something you would want to dot because when July number comes, you will have to modify your expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeAvg(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;year, month, date = {'&amp;lt;=$(=AddMonths(Max(date), -0))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -0))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;year, month, date = {'&amp;lt;=$(=AddMonths(Max(date), -1))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -1))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;year, month, date = {'&amp;lt;=$(=AddMonths(Max(date), -2))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -2))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;year, month, date = {'&amp;lt;=$(=AddMonths(Max(date), -3))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -3))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;year, month, date = {'&amp;lt;=$(=AddMonths(Max(date), -4))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -4))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth)),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;year, month, date = {'&amp;lt;=$(=AddMonths(Max(date), -5))'}&amp;gt;}TOTAL Aggr(Sum({&amp;lt;year, month, date={'&amp;lt;=$(=AddMonths(Max(date), -5))'},aR = {'aR'}&amp;gt;}[Amount]), YearMonth)))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 01:24:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117090#M630730</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-03T01:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117091#M630731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also try this which will work in Qlik Sense &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;, but not in QV9 &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(If(YearMonth = Max(TOTAL YearMonth),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeAvg(Below(RangeSum(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Above(RangeSum(Above(Sum({&amp;lt;year, month&amp;gt;}[Amount]*-1), 0, RowNo()))),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-Sum(TOTAL Aggr(Sum({&amp;lt;year, month&amp;gt;}[Amount]*-1), YearMonth))), 0, Max(TOTAL {&amp;lt;year = {$(=Max(year))}&amp;gt;} month)))), (YearMonth, (NUMERIC, desc)))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 01:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117091#M630731</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-03T01:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117092#M630732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much your expression work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 02:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117092#M630732</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-08-03T02:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117093#M630733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I carefully look at your expression which work in QS , it there a way convert it to SET expression and allow user to select year and month ? As I need to cal the CY LY PY value and make compare , in order to compute the cash conversion cycle for aR aP and sTOCK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can advise me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from my iPhone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 02:55:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117093#M630733</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-08-03T02:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117094#M630734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will look at this tomorrow, going off to sleep now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 02:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117094#M630734</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-03T02:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: SET expression give YTD value , How to make it Average amount ?</title>
      <link>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117095#M630735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to try using your propose SET expression for getting average amount for current year . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I know if I need to get LY average amount , it there a way that I can using the same expression but change to month_n or using if LY_FLAG , and YTD_FLAG , so that I don't need to modify the expression .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can advise me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from my iPhone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 00:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SET-expression-give-YTD-value-How-to-make-it-Average-amount/m-p/1117095#M630735</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2016-08-05T00:43:24Z</dc:date>
    </item>
  </channel>
</rss>

