<?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 Calculated dimension in aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480382#M179535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to have aggr() do roll up over a calculated dimension? Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(sum(Sales), Year(Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like aggr breaks the moment I put any expression as dimension. For example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works: aggr(sum(Sales), Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this doesn't: aggr(sum(Sales), if(1=1,Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2013 15:27:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-04T15:27:31Z</dc:date>
    <item>
      <title>Calculated dimension in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480382#M179535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to have aggr() do roll up over a calculated dimension? Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(sum(Sales), Year(Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like aggr breaks the moment I put any expression as dimension. For example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works: aggr(sum(Sales), Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this doesn't: aggr(sum(Sales), if(1=1,Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 15:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480382#M179535</guid>
      <dc:creator />
      <dc:date>2013-09-04T15:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480383#M179536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think that would work as the aggr statement will not have something solid to query the data model with.&lt;/P&gt;&lt;P&gt;Does the calculated dimension have to be calculated on the front-end or could it be pushed back to the data model? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 15:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480383#M179536</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2013-09-04T15:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480384#M179537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a note about calculated dimensions in help:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;There is a special function for advanced aggregations:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;aggr (&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;[ &lt;SPAN class="Bold"&gt;distinct&lt;/SPAN&gt; | &lt;SPAN class="Bold"&gt;nodistinct&lt;/SPAN&gt; ] &lt;BR /&gt;[{set_expression}]expression {, dimension}&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Returns a set of values of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; calculated &lt;BR /&gt;over &lt;SPAN style="font-style: italic;"&gt;dimensions&lt;/SPAN&gt;. The result can be &lt;BR /&gt;compared to the expression column of a 'local chart', evaluated in the context &lt;BR /&gt;where the &lt;SPAN class="Bold"&gt;aggr&lt;/SPAN&gt; function resides. &lt;STRONG&gt;Each &lt;SPAN class="Italic"&gt;dimension&lt;/SPAN&gt; must be a single field. It cannot be an expression &lt;/STRONG&gt;&lt;STRONG&gt;(calculated dimension). &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 15:58:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480384#M179537</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-09-04T15:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension in aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480385#M179538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... That is, the field Year must be created in the script.&amp;nbsp; After that, this will work:&lt;/P&gt;&lt;P&gt;aggr(sum(Sales), Year)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 16:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-dimension-in-aggr/m-p/480385#M179538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T16:17:37Z</dc:date>
    </item>
  </channel>
</rss>

