<?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: Second aggregation not working as expected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707097#M674501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;now both the tables are linked based on the ClaimYear field.&lt;/P&gt;&lt;P&gt;In table one you do not have distinct ClaimYear as it was group by along with Chassis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jul 2014 14:30:46 GMT</pubDate>
    <dc:creator>sudeepkm</dc:creator>
    <dc:date>2014-07-18T14:30:46Z</dc:date>
    <item>
      <title>Second aggregation not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707096#M674500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my application I have a table CLAIMFACTS, about 55,000 rows &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make statistics I aggregate this set of data with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RolledUpChassisCost:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Chassis,&lt;/P&gt;&lt;P&gt;ClaimYear,&lt;/P&gt;&lt;P&gt;Count(DISTINCT Chassis) as RolledUpChassisCount,&lt;/P&gt;&lt;P&gt;Sum([DAF Claim- Total]) as RolledUpChassisCost,&lt;/P&gt;&lt;P&gt;Floor(Sum([DAF Claim- Total])/100) * 100 as RolledUpCostBucket&lt;/P&gt;&lt;P&gt;Resident ClaimFacts&lt;/P&gt;&lt;P&gt;Group By Chassis, ClaimYear;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine, and if I pivot this in Excel around the RolledUpCostBucket dimension I get a nice frequency histogram. Chassis frequency is in hundreds, which is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I try the pivot in next part of my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Buckets:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;ClaimYear,&lt;/P&gt;&lt;P&gt;Sum(RolledUpChassisCost)/Sum(RolledUpChassisCount) as AverageYearlyCost,&lt;/P&gt;&lt;P&gt;Floor((Sum(RolledUpChassisCost)/Sum(RolledUpChassisCount))/100)*100 as AverageYearlyBucket,&lt;/P&gt;&lt;P&gt;Count(DISTINCT Chassis) as AverageYearlyFreq&lt;/P&gt;&lt;P&gt;Resident RolledUpChassisCost&lt;/P&gt;&lt;P&gt;Group By ClaimYear;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, AverageYearlyFreq is now in tens of thousands (should be in hundreds), two developers cannot solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I cannot upload qvw due to policy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 14:16:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707096#M674500</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2014-07-18T14:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Second aggregation not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707097#M674501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;now both the tables are linked based on the ClaimYear field.&lt;/P&gt;&lt;P&gt;In table one you do not have distinct ClaimYear as it was group by along with Chassis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 14:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707097#M674501</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2014-07-18T14:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Second aggregation not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707098#M674502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Martyn,&lt;/P&gt;&lt;P&gt;Would it be possible to attach an excel file with some dummy data and maybe whats the result you are getting vs expected. That would greatly help in addressing the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just an FYI,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count(DISTINCT Chassis) as RolledUpChassisCount,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;The above line in the first table will always be 1 as you are grouping by Chassis as well. So not sure why you are using that. Its equivalent to &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;1 as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RolledUpChassisCount&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 14:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707098#M674502</guid>
      <dc:creator />
      <dc:date>2014-07-18T14:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Second aggregation not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707099#M674503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I didn't intend to link the tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2014 14:44:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Second-aggregation-not-working-as-expected/m-p/707099#M674503</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2014-07-18T14:44:04Z</dc:date>
    </item>
  </channel>
</rss>

