<?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 do Roll up Totals? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569907#M212369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your image it looks like you are trying to report in a list box. You will not be able to show totals etc. Rather use a pivot table - this is the correct object for your requirements. Use the top 4 levels as dimensions and set partial totals where required. Actually I would use all 5 levels and make sure that I have a partial total at the required levels. Now the users can selectively expand to drill down into the lower level details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression does not make a lot of sense and I don't think it will total correctly. It is just returning the absolute values, and is arithmetically identical to Fabs(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_DR_AMT) - sum(VD_CR_AMT)&lt;/SPAN&gt;). If you want to gross up positive and negative values, create two expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMax(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_DR_AMT) - sum(VD_CR_AMT)&lt;/SPAN&gt;, 0)&amp;nbsp; // for positive values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMin(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_DR_AMT) - sum(VD_CR_AMT)&lt;/SPAN&gt;, 0)&amp;nbsp; // for negative values or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMax(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_CR_AMT) - sum(VD_DR_AMT)&lt;/SPAN&gt;, 0)&amp;nbsp; // displaying them as positive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Feb 2014 07:57:41 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-02-26T07:57:41Z</dc:date>
    <item>
      <title>How to do Roll up Totals?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569905#M212367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;i am doing a POC for a General Ledger application. I need to do roll up totals at Control Account levels. the totals that appear are reconciled. the Chart of Account is 5 levels. i want to be able to calculate totals at above four levels reaching up to first level (Type of Account: Assets, Expense etc.)&lt;/P&gt;&lt;P&gt;so in my case i want total at:&lt;/P&gt;&lt;P&gt;- Assets&lt;/P&gt;&lt;P&gt;- Fixed Assets&lt;/P&gt;&lt;P&gt;- Tangible Operating Fixed Assets&lt;/P&gt;&lt;P&gt;- Land&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i just cant figure out how to do it.&lt;/P&gt;&lt;P&gt;the object type is list box and i have configured it to appear as tree by specifying '-'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i use following expression in calculating the amount: =$(vBal) and value of vBal is following expression (line copy/pasted):&lt;/P&gt;&lt;P&gt;LET vBal = 'if (sum(VD_DR_AMT) &amp;gt; sum(VD_CR_AMT),(sum(VD_DR_AMT) - sum(VD_CR_AMT)),if (sum(VD_CR_AMT) &amp;gt; sum(VD_DR_AMT),(sum(VD_CR_AMT) - sum(VD_DR_AMT)),0))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciated your reply in advance.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sibtain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 07:38:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569905#M212367</guid>
      <dc:creator />
      <dc:date>2014-02-26T07:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Roll up Totals?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569906#M212368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sibtain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you want to do it in List Box? I think Straight Table/Pivot Table would be better&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lukasz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 07:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569906#M212368</guid>
      <dc:creator />
      <dc:date>2014-02-26T07:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Roll up Totals?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569907#M212369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your image it looks like you are trying to report in a list box. You will not be able to show totals etc. Rather use a pivot table - this is the correct object for your requirements. Use the top 4 levels as dimensions and set partial totals where required. Actually I would use all 5 levels and make sure that I have a partial total at the required levels. Now the users can selectively expand to drill down into the lower level details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression does not make a lot of sense and I don't think it will total correctly. It is just returning the absolute values, and is arithmetically identical to Fabs(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_DR_AMT) - sum(VD_CR_AMT)&lt;/SPAN&gt;). If you want to gross up positive and negative values, create two expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMax(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_DR_AMT) - sum(VD_CR_AMT)&lt;/SPAN&gt;, 0)&amp;nbsp; // for positive values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMin(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_DR_AMT) - sum(VD_CR_AMT)&lt;/SPAN&gt;, 0)&amp;nbsp; // for negative values or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMax(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum(VD_CR_AMT) - sum(VD_DR_AMT)&lt;/SPAN&gt;, 0)&amp;nbsp; // displaying them as positive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 07:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569907#M212369</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-02-26T07:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Roll up Totals?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569908#M212370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My totals are correct, as i am trying to calculate the ledger balance and have tallied these figures also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, your mention of Range series of function has potentially solved another problem not yet mentioned. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;I am definitely going to try it and the above functions as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, can you tell me any function or way out to ignore NULL values in set expression and count on values which actually have values (excluding null value set from actual set)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sibtain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 08:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569908#M212370</guid>
      <dc:creator />
      <dc:date>2014-02-26T08:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Roll up Totals?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569909#M212371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lukasz,&lt;/P&gt;&lt;P&gt;Thanks for pointing out to Pivot Table, although i had tried it but not with "each level of chart of account as a dimension" have been trying as a whole. so far it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT what is really wanted to do was generating these dimensions dynamically as Chart of Account would change from company to company. It would kind of a Hardcoded design, although it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sibtain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 08:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569909#M212371</guid>
      <dc:creator />
      <dc:date>2014-02-26T08:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Roll up Totals?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569910#M212372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sibtain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Null values are generally ignored in aggregation functions, so Count() will not count null values, Sum() will treat null values as zero, Avg() etc also do not consider null values. So you can usually rely on the default handling of QV to take care of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difficult part is when DO need to include the nulls. But set expressions (which is just a filtering technique) cannot select a null (just like you cannot yourself select a null in a list box or table). If, for some reason you do need to explicitly exclude nulls, then you can do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;Account={'*'}&amp;gt;} Balance)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will select all possible values and exclude nulls from the sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 13:36:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-do-Roll-up-Totals/m-p/569910#M212372</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-02-26T13:36:13Z</dc:date>
    </item>
  </channel>
</rss>

