<?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: Problem with 'Aggr' function and chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283561#M105398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found the solution!;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;aggr(NODISTINCT sum({&amp;lt;Product=&amp;gt;}If(InYearToDate(Date#(DateKey,'DD-MM-YYYY'),Date#('01'&amp;amp;'-'&amp;amp;CHART_Month&amp;amp;'-'&amp;amp;$(=PIT_Year),'DD-MM-YYYY'),0), Amount)),Category, CHART_Month)&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the aggr functions doesn't look to the dimension&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jul 2011 13:24:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-15T13:24:56Z</dc:date>
    <item>
      <title>Problem with 'Aggr' function and chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283558#M105395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with a 'aggr' function to calculate a share of a product in a certain category ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;IMG alt="2011-07-15 14.0601.gif" class="jive-image" src="https://community.qlik.com/legacyfs/online/5881_2011-07-15+14.0601.gif" /&gt;&lt;/P&gt;&lt;P&gt;(selection Month=12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 'Share in Category' I use the function;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum (Value) / aggr(NODISTINCT sum(Value),Category)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want a chart with on the dimension the months, this looks like this&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2011-07-15 14.1202.gif" class="jive-image" src="https://community.qlik.com/legacyfs/online/5891_2011-07-15+14.1202.gif" /&gt;&lt;/P&gt;&lt;P&gt;So far all works fine! See the value for month 12 in this table en the value in the first table! Now I want to add the share;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2011-07-15 14.1403.gif" class="jive-image" src="https://community.qlik.com/legacyfs/online/5892_2011-07-15+14.1403.gif" /&gt;&lt;/P&gt;&lt;P&gt;As you see i do not get the right value for share, the problem is the second part of the function;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;aggr(NODISTINCT sum(Value),Category)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one doesn't work right in the the last table, but when I select only one month in the table, it works fine again??!!;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2011-07-15 14.1704.gif" class="jive-image" src="https://community.qlik.com/legacyfs/online/5893_2011-07-15+14.1704.gif" /&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out here?? Thanks in advance!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached an example!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 12:20:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283558#M105395</guid>
      <dc:creator />
      <dc:date>2011-07-15T12:20:04Z</dc:date>
    </item>
    <item>
      <title>Problem with 'Aggr' function and chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283559#M105396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Day, Try to use Group By at the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 12:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283559#M105396</guid>
      <dc:creator>hugo_andrade</dc:creator>
      <dc:date>2011-07-15T12:29:09Z</dc:date>
    </item>
    <item>
      <title>Problem with 'Aggr' function and chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283560#M105397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you give me an example please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 12:36:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283560#M105397</guid>
      <dc:creator />
      <dc:date>2011-07-15T12:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 'Aggr' function and chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283561#M105398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found the solution!;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;aggr(NODISTINCT sum({&amp;lt;Product=&amp;gt;}If(InYearToDate(Date#(DateKey,'DD-MM-YYYY'),Date#('01'&amp;amp;'-'&amp;amp;CHART_Month&amp;amp;'-'&amp;amp;$(=PIT_Year),'DD-MM-YYYY'),0), Amount)),Category, CHART_Month)&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the aggr functions doesn't look to the dimension&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 13:24:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Aggr-function-and-chart/m-p/283561#M105398</guid>
      <dc:creator />
      <dc:date>2011-07-15T13:24:56Z</dc:date>
    </item>
  </channel>
</rss>

