<?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: aggr(sum(value),dim - positional problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908939#M989530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Swuehl.&amp;nbsp; Your suggestion worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jul 2015 19:14:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-21T19:14:16Z</dc:date>
    <item>
      <title>aggr(sum(value),dim - positional problem</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908936#M989527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following sample inline script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *Inline [&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DoctorName,ClaimBatchNo,ClaimNumber,ClaimAmount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DrPenfield,120,01,725.75&lt;/P&gt;&lt;P&gt;DrJones,124,01,500.00&lt;/P&gt;&lt;P&gt;DrJones,124,01,-500.00&lt;/P&gt;&lt;P&gt;DrJones,123,01,650.95&lt;/P&gt;&lt;P&gt;DrJones,123,01,300.00&lt;/P&gt;&lt;P&gt;DrJones,123,02,87.50&lt;/P&gt;&lt;P&gt;DrJones,125,01,250.75&lt;/P&gt;&lt;P&gt;DrGraham,126,01,450.75&lt;/P&gt;&lt;P&gt;DrGraham,126,02,250.75&lt;/P&gt;&lt;P&gt;DrGraham,126,03,100.25&lt;/P&gt;&lt;P&gt;DrGraham,126,04,350.00&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A doctor may have one or more Claim Batches[ClaimBatchNo] and one or more Claims[ClaimNumbers] within each ClaimBatchNo.&amp;nbsp; A ClaimAmount can be positive or negative.&amp;nbsp; Using the expression &lt;STRONG&gt;aggr(sum(ClaimAmount),DoctorName), &lt;/STRONG&gt;I get the correct values for outstanding claims by Doctor but when an individual ClaimNumber as in the case of ClaimNumber &lt;STRONG&gt;124&lt;/STRONG&gt; for &lt;STRONG&gt;Dr. Jones&lt;/STRONG&gt; below is equal to 0, the outstanding claim amount shows up on the incorrect line.&amp;nbsp; I want the outstanding amount to be on the same line as the Doctor's name as indicated in the red/circle/arrow below.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached ZeroSumProblem.qvw gives me the following output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/93540_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I only have the Personal Edition of Qlikview at this time so if anyone can help me, I cannot read a response if it is contained in a .QVW returned file. &lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 17:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908936#M989527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-21T17:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: aggr(sum(value),dim - positional problem</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908937#M989528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to see this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/93543_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr(&lt;SPAN style="color: #ff0000;"&gt;NODISTINCT&lt;/SPAN&gt; sum(ClaimAmount),DoctorName)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 17:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908937#M989528</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-21T17:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: aggr(sum(value),dim - positional problem</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908938#M989529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use a quite similar expression as used for your dimension formatting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(above(total DoctorName)=DoctorName,' ',sum(Total&amp;lt;DoctorName&amp;gt; ClaimAmount))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 18:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908938#M989529</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-21T18:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: aggr(sum(value),dim - positional problem</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908939#M989530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Swuehl.&amp;nbsp; Your suggestion worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 19:14:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908939#M989530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-21T19:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: aggr(sum(value),dim - positional problem</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908940#M989531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try your suggested approach a couple of days ago.&amp;nbsp; As you can see, it gives the total amount per doctor on every line.&amp;nbsp; This is not what I wanted as the total must only appear on the Doctor first line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;DAvid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 19:16:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908940#M989531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-21T19:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: aggr(sum(value),dim - positional problem</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908941#M989532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am glad &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌ was able to help you out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2015 19:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908941#M989532</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-21T19:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: aggr(sum(value),dim - positional problem</title>
      <link>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908942#M989533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestions works but if you would not mind, can you explain what the purpose is for the&lt;STRONG&gt; ' '&lt;/STRONG&gt; in the expression that you gave me:&amp;nbsp; if(above(total DoctorName)=DoctorName,&lt;STRONG&gt;' ',&lt;/STRONG&gt;sum(Total&amp;lt;DoctorName&amp;gt; ClaimAmount)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 18:09:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/aggr-sum-value-dim-positional-problem/m-p/908942#M989533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-23T18:09:28Z</dc:date>
    </item>
  </channel>
</rss>

