<?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 Problem with SUM but can set analysis or aggr function fix this? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-SUM-but-can-set-analysis-or-aggr-function-fix-this/m-p/157790#M33137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 259pt; border-collapse: collapse;" width="345"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 78pt; mso-width-source: userset; mso-width-alt: 3803; mso-outline-parent: collapsed;" width="104" /&gt;&lt;COL style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669; mso-outline-parent: collapsed;" width="73" /&gt;&lt;COL style="width: 26pt; mso-width-source: userset; mso-width-alt: 1280; mso-outline-parent: collapsed;" width="35" /&gt;&lt;COL style="width: 46pt; mso-width-source: userset; mso-width-alt: 2230; mso-outline-parent: collapsed;" width="61" /&gt;&lt;COL style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633; mso-outline-parent: collapsed;" width="72" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Hi All,&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I'm very new to Qlik so apologies if I'm asking something silly!&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="43" style="height: 32.25pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="43" style="width: 259pt; height: 32.25pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I'm trying to analyse some data, though am having problems getting the chart to calculate at the correct level.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="56" style="height: 42pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="56" style="width: 259pt; height: 42pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;What I'm trying to do is a little more coplex but simplified I have two tables, as follows:&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;Table1:&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;contract&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;type&lt;/TD&gt;&lt;TD class="xl26" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;limit&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;X&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;1000&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a002&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;1000&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a003&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;Z&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;1500&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;Table2:&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;contract&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;product&lt;/TD&gt;&lt;TD class="xl26" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;amount&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;AB&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;CD&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;EF&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;EF&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a002&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;GH&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a002&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;GH&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="85" style="height: 63.75pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="85" style="width: 259pt; height: 63.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Table1 has unique contract numbers, Table2 can have multiple instances of the contract number.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I've created a variable that I'm using as a calculated dimension like this:&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;$(category) =&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="58" style="height: 43.5pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="58" style="width: 259pt; height: 43.5pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;if( type='X' and match(product,'EF','CD')&amp;gt;0, 'XEF' , 'Other')&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="35" style="height: 26.25pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="35" style="width: 259pt; height: 26.25pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;which correctly gives two values in the dimension.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="120" style="height: 90pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="120" style="width: 259pt; height: 90pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;However when I try to sum the 'amount' from Table2 with the 'limit' from Table1 the 'limit' amount shows in each dimension for contract 'a001' as this has a value in both products mapping to XEF and one that maps to 'Other'.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;In this example what I'm trying to get to is a chart where:&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;category&lt;/TD&gt;&lt;TD class="xl26" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;limit&lt;/TD&gt;&lt;TD class="xl26" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl26" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;amount&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;XEF&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;1000&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;300&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;Other&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;2500&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;300&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="74" style="height: 55.5pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="74" style="width: 259pt; height: 55.5pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I'm guessing I need to use some sort of set analysis or maybe the aggr function, but had a play with these and couldn't get either to give me the result I'm looking for.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="41" style="height: 30.75pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="41" style="width: 259pt; height: 30.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Hope this makes sense and any pointers in the right direction would be much appreciated.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Many thanks &amp;amp; kind regards,&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Phil&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Feb 2010 12:31:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-02-24T12:31:54Z</dc:date>
    <item>
      <title>Problem with SUM but can set analysis or aggr function fix this?</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-SUM-but-can-set-analysis-or-aggr-function-fix-this/m-p/157790#M33137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 259pt; border-collapse: collapse;" width="345"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 78pt; mso-width-source: userset; mso-width-alt: 3803; mso-outline-parent: collapsed;" width="104" /&gt;&lt;COL style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669; mso-outline-parent: collapsed;" width="73" /&gt;&lt;COL style="width: 26pt; mso-width-source: userset; mso-width-alt: 1280; mso-outline-parent: collapsed;" width="35" /&gt;&lt;COL style="width: 46pt; mso-width-source: userset; mso-width-alt: 2230; mso-outline-parent: collapsed;" width="61" /&gt;&lt;COL style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633; mso-outline-parent: collapsed;" width="72" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Hi All,&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I'm very new to Qlik so apologies if I'm asking something silly!&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="43" style="height: 32.25pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="43" style="width: 259pt; height: 32.25pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I'm trying to analyse some data, though am having problems getting the chart to calculate at the correct level.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="56" style="height: 42pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="56" style="width: 259pt; height: 42pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;What I'm trying to do is a little more coplex but simplified I have two tables, as follows:&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;Table1:&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;contract&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;type&lt;/TD&gt;&lt;TD class="xl26" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;limit&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;X&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;1000&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a002&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;Y&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;1000&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a003&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;Z&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;1500&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;Table2:&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;contract&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;product&lt;/TD&gt;&lt;TD class="xl26" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;amount&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;AB&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;CD&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;EF&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a001&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;EF&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a002&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;GH&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;a002&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;GH&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;100&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="85" style="height: 63.75pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="85" style="width: 259pt; height: 63.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Table1 has unique contract numbers, Table2 can have multiple instances of the contract number.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I've created a variable that I'm using as a calculated dimension like this:&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;$(category) =&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="58" style="height: 43.5pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="58" style="width: 259pt; height: 43.5pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;if( type='X' and match(product,'EF','CD')&amp;gt;0, 'XEF' , 'Other')&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="35" style="height: 26.25pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="35" style="width: 259pt; height: 26.25pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;which correctly gives two values in the dimension.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="120" style="height: 90pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="120" style="width: 259pt; height: 90pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;However when I try to sum the 'amount' from Table2 with the 'limit' from Table1 the 'limit' amount shows in each dimension for contract 'a001' as this has a value in both products mapping to XEF and one that maps to 'Other'.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;In this example what I'm trying to get to is a chart where:&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;category&lt;/TD&gt;&lt;TD class="xl26" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;limit&lt;/TD&gt;&lt;TD class="xl26" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl26" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;amount&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;XEF&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;1000&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;300&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;Other&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;2500&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;300&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl25" height="17" style="width: 78pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="104"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 55pt; background-color: transparent; border: #d4d0c8;" width="73"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 26pt; background-color: transparent; border: #d4d0c8;" width="35"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 46pt; background-color: transparent; border: #d4d0c8;" width="61"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="width: 54pt; background-color: transparent; border: #d4d0c8;" width="72"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="74" style="height: 55.5pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="74" style="width: 259pt; height: 55.5pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;I'm guessing I need to use some sort of set analysis or maybe the aggr function, but had a play with these and couldn't get either to give me the result I'm looking for.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="41" style="height: 30.75pt; mso-height-source: userset;"&gt;&lt;TD class="xl24" colspan="5" height="41" style="width: 259pt; height: 30.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Hope this makes sense and any pointers in the right direction would be much appreciated.&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Many thanks &amp;amp; kind regards,&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl24" colspan="5" height="17" style="width: 259pt; height: 12.75pt; background-color: transparent; border: #d4d0c8;" width="345"&gt;Phil&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2010 12:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-SUM-but-can-set-analysis-or-aggr-function-fix-this/m-p/157790#M33137</guid>
      <dc:creator />
      <dc:date>2010-02-24T12:31:54Z</dc:date>
    </item>
  </channel>
</rss>

