<?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 Problem using AGGR() with a ValueList() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/189961#M52643</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to use AGGR() in more than one dimension of a ValueList but can't seem to get it to work.&lt;/P&gt;&lt;P&gt;Consider the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;/* Test 1 */&lt;BR /&gt;IF(ValueList('%Count','Sales','Margin')='%Count'&lt;BR /&gt; ,NUM(SUM(IF(AGGR(SUM(Sales-Cost)/SUM(Sales),MaterialNo)&amp;gt;0,1))&lt;BR /&gt; /COUNT(DISTINCT MaterialNo),'#0.0%')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Sales'&lt;BR /&gt; ,NUM(SUM(IF(Sales&amp;gt;0,Sales)),'$#,###,##0')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Margin'&lt;BR /&gt; ,NUM(SUM(IF(Sales-Cost&amp;gt;0,Sales-Cost)),'$#,###,##0')&lt;BR /&gt;)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I get correct values for all three dimensions.&lt;/P&gt;&lt;P&gt;Now consider this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;/* Test 2 */&lt;BR /&gt;IF(ValueList('%Count','Sales','Margin')='%Count'&lt;BR /&gt; ,NUM(SUM(IF(AGGR(SUM(Sales-Cost)/SUM(Sales),MaterialNo)&amp;gt;0,1))&lt;BR /&gt; /COUNT(DISTINCT MaterialNo),'#0.0%')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Sales'&lt;BR /&gt; ,NUM(SUM(IF(AGGR(SUM(Sales-Cost)/SUM(Sales),MaterialNo)&amp;gt;0,1))&lt;BR /&gt; /COUNT(DISTINCT MaterialNo),'#0.0%')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Margin'&lt;BR /&gt; ,NUM(SUM(IF(Sales-Cost&amp;gt;0,Sales-Cost)),'$#,###,##0')&lt;BR /&gt;)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;[Note that the calculation for 'Sales' is now identical to the calculation for '%Count'.]&lt;/P&gt;&lt;P&gt;The values for '%Count' and '%Margin' are correct, but the row 'Sales' is not displayed.&lt;/P&gt;&lt;P&gt;Any ideas why I can't get the 'Sales' row to appear?&lt;BR /&gt;Is there some restriction on ValueLists where only one AGGR can be used?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jan 2011 20:56:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-27T20:56:59Z</dc:date>
    <item>
      <title>Problem using AGGR() with a ValueList()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/189961#M52643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to use AGGR() in more than one dimension of a ValueList but can't seem to get it to work.&lt;/P&gt;&lt;P&gt;Consider the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;/* Test 1 */&lt;BR /&gt;IF(ValueList('%Count','Sales','Margin')='%Count'&lt;BR /&gt; ,NUM(SUM(IF(AGGR(SUM(Sales-Cost)/SUM(Sales),MaterialNo)&amp;gt;0,1))&lt;BR /&gt; /COUNT(DISTINCT MaterialNo),'#0.0%')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Sales'&lt;BR /&gt; ,NUM(SUM(IF(Sales&amp;gt;0,Sales)),'$#,###,##0')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Margin'&lt;BR /&gt; ,NUM(SUM(IF(Sales-Cost&amp;gt;0,Sales-Cost)),'$#,###,##0')&lt;BR /&gt;)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I get correct values for all three dimensions.&lt;/P&gt;&lt;P&gt;Now consider this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;/* Test 2 */&lt;BR /&gt;IF(ValueList('%Count','Sales','Margin')='%Count'&lt;BR /&gt; ,NUM(SUM(IF(AGGR(SUM(Sales-Cost)/SUM(Sales),MaterialNo)&amp;gt;0,1))&lt;BR /&gt; /COUNT(DISTINCT MaterialNo),'#0.0%')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Sales'&lt;BR /&gt; ,NUM(SUM(IF(AGGR(SUM(Sales-Cost)/SUM(Sales),MaterialNo)&amp;gt;0,1))&lt;BR /&gt; /COUNT(DISTINCT MaterialNo),'#0.0%')&lt;BR /&gt;,IF(ValueList('%Count','Sales','Margin')='Margin'&lt;BR /&gt; ,NUM(SUM(IF(Sales-Cost&amp;gt;0,Sales-Cost)),'$#,###,##0')&lt;BR /&gt;)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;[Note that the calculation for 'Sales' is now identical to the calculation for '%Count'.]&lt;/P&gt;&lt;P&gt;The values for '%Count' and '%Margin' are correct, but the row 'Sales' is not displayed.&lt;/P&gt;&lt;P&gt;Any ideas why I can't get the 'Sales' row to appear?&lt;BR /&gt;Is there some restriction on ValueLists where only one AGGR can be used?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 20:56:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/189961#M52643</guid>
      <dc:creator />
      <dc:date>2011-01-27T20:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using AGGR() with a ValueList()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/189962#M52644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same problem and it seems the AGGR function does not like it when a ValueList is used in dimension.&amp;nbsp; Indeed it doesn't even like it when you use an island dimension.&amp;nbsp; But I managed to create a workaround by using the island dimension in the AGGR function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching a modified qvw of the example above for anyone in the future who is also looking for a solution to this problem.&amp;nbsp; I added DummyDimension in the load script and created a copy of Test2 chart and called it Test4.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 15:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/189962#M52644</guid>
      <dc:creator>nathanfurby</dc:creator>
      <dc:date>2011-09-19T15:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using AGGR() with a ValueList()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/189963#M52645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also facing the same issue while I am using Aggr with ValueList . I really cannot substitute ValueList with inline table. Any other workaround found yet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 07:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/189963#M52645</guid>
      <dc:creator>vikraant</dc:creator>
      <dc:date>2018-10-16T07:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using AGGR() with a ValueList()</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/1791644#M1210717</link>
      <description>&lt;P&gt;Can you upload a qvf version?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 04:26:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-AGGR-with-a-ValueList/m-p/1791644#M1210717</guid>
      <dc:creator>SujanJoeJacob</dc:creator>
      <dc:date>2021-03-16T04:26:55Z</dc:date>
    </item>
  </channel>
</rss>

