<?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: 3 month average not working in straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021795#M345595</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;May be like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=(sum({&amp;lt;[Year]={'$(=max([Year]))'},[Month]={'$(=$(vCurrentMonth))'}&amp;gt;} [REVENUE]) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Avg({&amp;lt;[Year]={'$(=max([Year]))'},[DATE]={'&amp;gt;=$(=monthstart(max([DATE]),-2))&amp;lt;=$(=monthend(max([DATE])))'}&amp;gt;} [REVENUE])))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Avg({&amp;lt;[Year]={'$(=max([Year]))'},[DATE]={'&amp;gt;=$(=monthstart(max([DATE]),-2))&amp;lt;=$(=monthend(max([DATE])))'}&amp;gt;} [REVENUE]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this expression,&lt;/P&gt;&lt;P&gt;-Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jan 2016 09:16:52 GMT</pubDate>
    <dc:creator>HirisH_V7</dc:creator>
    <dc:date>2016-01-19T09:16:52Z</dc:date>
    <item>
      <title>3 month average not working in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021793#M345593</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;I have a straight table with dimension = CLIENT and in the expression, I'm using set analysis to get the revenue vs. 3 month average as a percentage, which is (revenue - 3m avg)/3m avg, like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(sum({&amp;lt;[Year]={'$(=max([Year]))'},[Month]={'$(=$(vCurrentMonth))'}&amp;gt;} [REVENUE])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(sum({&amp;lt;[Year]={'$(=max([Year]))'},[DATE]={'&amp;gt;=$(=monthstart(max([DATE]),-2))&amp;lt;=$(=monthend(max([DATE])))'}&amp;gt;} [REVENUE])/3))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(sum({&amp;lt;[Year]={'$(=max([Year]))'},[DATE]={'&amp;gt;=$(=monthstart(max([DATE]),-2))&amp;lt;=$(=monthend(max([DATE])))'}&amp;gt;} [REVENUE])/3)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for some reason this expression ignores the dimension and gives the 3m average of ALL clients on each row. What could be wrong with this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 16:58:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021793#M345593</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2016-01-18T16:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: 3 month average not working in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021794#M345594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bump&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 09:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021794#M345594</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2016-01-19T09:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: 3 month average not working in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021795#M345595</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;May be like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=(sum({&amp;lt;[Year]={'$(=max([Year]))'},[Month]={'$(=$(vCurrentMonth))'}&amp;gt;} [REVENUE]) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Avg({&amp;lt;[Year]={'$(=max([Year]))'},[DATE]={'&amp;gt;=$(=monthstart(max([DATE]),-2))&amp;lt;=$(=monthend(max([DATE])))'}&amp;gt;} [REVENUE])))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Avg({&amp;lt;[Year]={'$(=max([Year]))'},[DATE]={'&amp;gt;=$(=monthstart(max([DATE]),-2))&amp;lt;=$(=monthend(max([DATE])))'}&amp;gt;} [REVENUE]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this expression,&lt;/P&gt;&lt;P&gt;-Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 09:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021795#M345595</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2016-01-19T09:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: 3 month average not working in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021796#M345596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you may be try breaking the expression into pieces and build it together one by one. Start with a simple expression Sum(REVENUE) against the dimension Client to check if that is working or not. If you still get same number for all rows, I would think that somehow Client and Revenue fields are not linked to each other. but if they do, I will check this -&amp;gt; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;[Year]={'$(=max([Year]))'},[Month]={'$(=$(vCurrentMonth))'}&amp;gt;} [REVENUE]) &lt;/STRONG&gt;and this -&amp;gt; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;[Year]={'$(=max([Year]))'},[DATE]={'&amp;gt;=$(=monthstart(max([DATE]),-2))&amp;lt;=$(=monthend(max([DATE])))'}&amp;gt;} [REVENUE])/3)&lt;/STRONG&gt;&lt;/STRONG&gt; as two separate expressions. and go on from there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 09:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021796#M345596</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-19T09:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: 3 month average not working in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021797#M345597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest that you upload your qvw or a representative sample. It looks like the problem could be that the CLIENT and REVENUE are not associated correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 09:35:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021797#M345597</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-01-19T09:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: 3 month average not working in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021798#M345598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry guys, the issue was this: &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Year]={'$(=max([Year]))'}, &lt;/STRONG&gt;since it's January 2016, it's not able to look back 3 months because of this restriction, hence it didn't work. Removing this worked. I'm not sure why it caused the expression to aggregate over all clients though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the client and revenue are on the same table so there aren't any issues with that. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 13:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-month-average-not-working-in-straight-table/m-p/1021798#M345598</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2016-01-19T13:03:01Z</dc:date>
    </item>
  </channel>
</rss>

