<?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: Double Aggr() in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428977#M569737</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was my first idea aswell but nothing is changing. im really out of idea's on this one the single aggr() works more than fine but when combined something thats not suppose to happen happens. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2012 14:24:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-18T14:24:53Z</dc:date>
    <item>
      <title>Double Aggr() in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428973#M569733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everyone i have the need to create a chart that &lt;SPAN style="text-decoration: underline;"&gt;always&lt;/SPAN&gt; show the total amount paid for a selected project/projects. Im having some troubles using 2 times the aggr() function since is not returning me what i expect &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the expression im working on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AGGR(sum({1&amp;lt;PROJECT_ID= P ()&amp;gt;} PAYMENT_AMOUNT), PROJECT) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does what i want keeps the chart always with the total amount paid for the project ignoring low-level selections. Problem is that i need to insert a second AGGR() to avoid wrong results caused by rateal payments and similar stuff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AGGR(sum(AGGR({1&amp;lt;PROJECT_ID= P ()&amp;gt;} PAYMENT_AMOUNT, INVOICE_PAYMENT_ID)), PROJECT)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one instead is giving me the right amounts but when i do a low level selection, like Invoice_number, changes the chart and shows only the payment for the selected invoice.&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;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Cant figure out how to solve this issue any help piece of advice will be apreciated &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Regards, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Juan Pedro&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 13:25:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428973#M569733</guid>
      <dc:creator />
      <dc:date>2012-10-18T13:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Double Aggr() in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428974#M569734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AGGR( &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({1}&amp;nbsp; AGGR(sum({1&amp;lt;PROJECT_ID= P ()&amp;gt;} PAYMENT_AMOUNT), INVOICE_PAYMENT_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, PROJECT)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 13:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428974#M569734</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-18T13:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Double Aggr() in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428975#M569735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey there ty for your anserw, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression is half working &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; keeps the chart invariated but the aggregation is not correct at some point since my results are falsed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will work on it a bit maybe i can fix it &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Juan Pedro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 13:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428975#M569735</guid>
      <dc:creator />
      <dc:date>2012-10-18T13:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Double Aggr() in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428976#M569736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to duplicate the inner set expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AGGR( &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({1&amp;lt;&lt;/STRONG&gt;&lt;STRONG&gt;PROJECT_ID= P ()&amp;gt;&lt;/STRONG&gt;&lt;STRONG&gt;}&amp;nbsp; AGGR(sum({1&amp;lt;PROJECT_ID= P ()&amp;gt;} PAYMENT_AMOUNT), INVOICE_PAYMENT_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, PROJECT)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 14:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428976#M569736</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-18T14:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Double Aggr() in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428977#M569737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was my first idea aswell but nothing is changing. im really out of idea's on this one the single aggr() works more than fine but when combined something thats not suppose to happen happens. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 14:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428977#M569737</guid>
      <dc:creator />
      <dc:date>2012-10-18T14:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Double Aggr() in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428978#M569738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you need to use the NODISTINCT qualifier with the aggr() function (one or the other, or both), and depending in which context you are using the aggr() function, it might require an additional aggregation around the complete current expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(AGGR( &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({1&amp;lt;PROJECT_ID= P ()&amp;gt;}&amp;nbsp; AGGR(sum({1&amp;lt;PROJECT_ID= P ()&amp;gt;} PAYMENT_AMOUNT), INVOICE_PAYMENT_ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, PROJECT))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also not sure if you really need to aggr() functions, one embedded into the other, but it's hard to say without knowing more about your data model and expression context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you maybe upload a small sample that demonstrates your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 14:29:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428978#M569738</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-18T14:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Double Aggr() in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428979#M569739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, im not at work anymore so cant send you a sample right now. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to describe the situation a bit better and tomorrow i will post a sample. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- In my report i have summary page&lt;/P&gt;&lt;P&gt;- The summary page contains.&lt;/P&gt;&lt;P&gt;- Invoices chart&lt;/P&gt;&lt;P&gt;- Payments chart&lt;/P&gt;&lt;P&gt;- total project cost (The Chart that is giving me problems.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices and Payments are returning right results and this is a fact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now what i want is: &lt;/P&gt;&lt;P&gt;- When a user selects a project the chart shows the total cost for the project&lt;/P&gt;&lt;P&gt;- A low level selection (like payment_number) wont affect the chart. This means i only want Project to be considered in this specific chart leaving apart all the others selections. &lt;/P&gt;&lt;P&gt;- Since i have different payments i have to use the aggr() function to make the results right. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can say the expression is not working fine at the moment because the amount in payments and total project cost should be identical when no low level selection is made. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it Helps&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Juan Pedro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 15:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Double-Aggr-in-expression/m-p/428979#M569739</guid>
      <dc:creator />
      <dc:date>2012-10-18T15:47:53Z</dc:date>
    </item>
  </channel>
</rss>

