<?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: Chart Aggregation Behavior in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258678#M97676</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John you are correct on all accounts.&amp;nbsp; I need to show a value for each line and then, for a total, the distinct amount.&amp;nbsp; The only way I see doing this is like you said, checking the dimensionality which is a little ugly but gets the job done.&amp;nbsp; Below expression gives me exactly what I need.&amp;nbsp; You should see though what I need to do in my actual .qvw vs this simple sample.&amp;nbsp; The measure is a derived measure so you can imagine for every measure I bring in to create the expression I need to add all of this logic.&amp;nbsp; Wish there was an easier way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'A'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {2}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UNITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Dimensionality&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;() = 3,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'A'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'2'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UNITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jun 2011 20:37:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-02T20:37:18Z</dc:date>
    <item>
      <title>Chart Aggregation Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258674#M97672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My users are asking for something very weird which I'm having a difficult time producing in QV.&amp;nbsp; I believe the solution is a combination of the aggr() function and set analysis, which I've tried but can't nail it.&amp;nbsp; The best way I can explain it is by including a sample .qvw attachment and the screen print below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The root of the problem is that I'm trying to work with an aggregated field that returns results (rows) that I don't want to display.&amp;nbsp; Even creating the attached example had me confused &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; If anybody can help I'd appreciate it, I think if you open the .qvw you will see exactly what I'm talking about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 23:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258674#M97672</guid>
      <dc:creator />
      <dc:date>2011-06-01T23:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Aggregation Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258675#M97673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understood the requirement, I think this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if("Reg 'A'&amp;nbsp; Type '1'&amp;nbsp; Units",sum({&amp;lt;Region={'A'},Type={'2'}&amp;gt;} total &amp;lt;Region,QTR&amp;gt; UNITS))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 23:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258675#M97673</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-01T23:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Aggregation Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258676#M97674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John you're great.&amp;nbsp; Yep I knew it was something simple like that ... sometimes I forget about combining if/then statements with set analysis or aggr function or TOTAL operator.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Here is the final expression if anybody is interested ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'A'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {2}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UNITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="color: #0000ff; font-size: 1;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 00:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258676#M97674</guid>
      <dc:creator />
      <dc:date>2011-06-02T00:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Aggregation Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258677#M97675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mentioned in a private message that this wasn't totaling.&amp;nbsp; I actually thought about that later, but wasn't sure what total you'd actually want.&amp;nbsp; So for the example, what total DO you want?&amp;nbsp; I'm guessing that for the total, you want to ignore the duplicate 1729, so have 1729 + 1 + 20 = 1750?&amp;nbsp; Or do you just want sum of rows?&amp;nbsp; If sum of rows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(nodistinct if(Type=1,sum({&amp;lt;Region={'A'},Type={'2'}&amp;gt;} total &amp;lt;QTR,Region&amp;gt; UNITS)),QTR,Region,Type))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if you remove the nodistinct, you get a sum of 1750, but you also only display the 1729 on one row.&amp;nbsp; I'm not seeing quickly how to solve it, so I'll leave it for now, at least until you confirm that you want a 1750 total instead of a 1750 + 1729 = 3479 total.&amp;nbsp; Well, one way to solve it would be to check the dimensionality and use one expression for the total line and another for the detail lines, but that seems like overkill, and there's surely a better way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 16:54:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258677#M97675</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-02T16:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Aggregation Behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258678#M97676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John you are correct on all accounts.&amp;nbsp; I need to show a value for each line and then, for a total, the distinct amount.&amp;nbsp; The only way I see doing this is like you said, checking the dimensionality which is a little ugly but gets the job done.&amp;nbsp; Below expression gives me exactly what I need.&amp;nbsp; You should see though what I need to do in my actual .qvw vs this simple sample.&amp;nbsp; The measure is a derived measure so you can imagine for every measure I bring in to create the expression I need to add all of this logic.&amp;nbsp; Wish there was an easier way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'A'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {2}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UNITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Dimensionality&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;() = 3,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'A'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'2'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UNITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Region&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 20:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chart-Aggregation-Behavior/m-p/258678#M97676</guid>
      <dc:creator />
      <dc:date>2011-06-02T20:37:18Z</dc:date>
    </item>
  </channel>
</rss>

