<?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: How to aggregate by chart dimension? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959432#M964010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dimension = Year(Action Due Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expression =sum(aggr(sum([Location Size]),LocationID, [Action Due Date]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Oct 2015 11:47:21 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2015-10-12T11:47:21Z</dc:date>
    <item>
      <title>How to aggregate by chart dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959430#M964008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read somewhere that the aggr function ignores dimension. I am having challenges working around this limitation for my chart. Here is my table:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="174" style="border: 1px solid rgb(0, 0, 0); width: 373px; height: 160px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;LocationID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Action Type&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Action Due Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Location Size&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12/1/2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12/15/2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DEF&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12/1/2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;DEF&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4/1/2016&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;GHI&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12/1/2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;JKL&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9/1/2016&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My chart that sums the Location Size by Action Due Date (by Year) is not working correctly. &lt;/P&gt;&lt;P&gt;Dimension = Year(Action Due Date)&lt;/P&gt;&lt;P&gt;Expression = SUM(aggr([Location Size],LocationID))&lt;/P&gt;&lt;P&gt;Using an aggregate because do not want to double count the size of the same location for each year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 2015, the sum should be 7300&lt;/P&gt;&lt;P&gt;For 2016, the sum should be 4500&lt;/P&gt;&lt;P&gt;The problem is that on my chart, 2016 is showing as 3000 (i.e. ignoring the 1500 of DEF). It will only correctly show 4500 if the chart is filtered to 2016. It seems the issue is because the record DEF is present in both 2015 and 2016 and the expression is somehow only permitting it to be calculated for one instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice? I've attached a working document. Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 11:39:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959430#M964008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-12T11:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate by chart dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959431#M964009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at the attach file &lt;/P&gt;&lt;P&gt;i added a year field in the load script &lt;/P&gt;&lt;P&gt;then added the new field to the aggr expression &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 11:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959431#M964009</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-10-12T11:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate by chart dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959432#M964010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Dimension = Year(Action Due Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expression =sum(aggr(sum([Location Size]),LocationID, [Action Due Date]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 11:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959432#M964010</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-10-12T11:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate by chart dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959433#M964011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a year field in the script, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Date) as Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; SUM(aggr([Location Size],&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Year, &lt;/STRONG&gt;LocationID))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 11:47:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959433#M964011</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-10-12T11:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate by chart dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959434#M964012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the year field in your LOAD script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD LocationID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Action Type], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Action Due Date], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Year(&lt;SPAN style="font-size: 13.3333px;"&gt; [Action Due Date] ) as [Action Due Year],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Location Size]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;loadfile3.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use this year field as dimension and add it to your aggr() function:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; SUM(aggr([Location Size],[Action Due Year],LocationID))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 11:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959434#M964012</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-12T11:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to aggregate by chart dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959435#M964013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try sum(distinct [Location Size])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 11:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-aggregate-by-chart-dimension/m-p/959435#M964013</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-12T11:52:15Z</dc:date>
    </item>
  </channel>
</rss>

