<?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: zero total value while using function in qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090267#M919167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think it's about the fabs() function, it's about that in your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((GL_HEAD = 2 and Column(3) &amp;gt; 0) or (GL_HEAD=1 and Column(3) &amp;gt; 0 and IS_BANK_ACCOUNT = 'Y') or (GL_HEAD=1 and Column(3) &amp;lt; 0 and IS_BANK_ACCOUNT = 'N') ,fabs(Column(3)),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field values GL_HEAD and IS_BANK_ACCOUNT are not defined to a unique value in the context of your total line (read also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3779"&gt;Use Aggregation Functions!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use advanced aggregation, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Sum( Aggr(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if ((GL_HEAD = 2 and Column(3) &amp;gt; 0) or (GL_HEAD=1 and Column(3) &amp;gt; 0 and IS_BANK_ACCOUNT = 'Y') or (GL_HEAD=1 and Column(3) &amp;lt; 0 and IS_BANK_ACCOUNT = 'N') ,fabs(Column(3)),0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,Group, SubGroup))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you would need to replace the column(3) references with the full expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2016 12:53:39 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-05-06T12:53:39Z</dc:date>
    <item>
      <title>zero total value while using function in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090265#M919164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am designing a simple report where i used Fabs function in expression . I am not getting total in bottom of chart . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please check my file and suggest . &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090265#M919164</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: zero total value while using function in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090266#M919165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be able to simplfy this, but this seems to be working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(if ((GL_HEAD = 2 and (sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)) - sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup))) &amp;gt; 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD=1 and (sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)) - sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup))) &amp;gt; 0 and IS_BANK_ACCOUNT = 'Y')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD=1 and (sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)) - sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup))) &amp;lt; 0 and IS_BANK_ACCOUNT = 'N'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fabs((sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)) - sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)))),0), Group, Subgroup))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Need to use Aggr() function to get the total right and when you use Aggr() you cannot use Column() function, unfortunately.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 12:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090266#M919165</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-06T12:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: zero total value while using function in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090267#M919167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think it's about the fabs() function, it's about that in your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((GL_HEAD = 2 and Column(3) &amp;gt; 0) or (GL_HEAD=1 and Column(3) &amp;gt; 0 and IS_BANK_ACCOUNT = 'Y') or (GL_HEAD=1 and Column(3) &amp;lt; 0 and IS_BANK_ACCOUNT = 'N') ,fabs(Column(3)),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field values GL_HEAD and IS_BANK_ACCOUNT are not defined to a unique value in the context of your total line (read also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3779"&gt;Use Aggregation Functions!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use advanced aggregation, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Sum( Aggr(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; if ((GL_HEAD = 2 and Column(3) &amp;gt; 0) or (GL_HEAD=1 and Column(3) &amp;gt; 0 and IS_BANK_ACCOUNT = 'Y') or (GL_HEAD=1 and Column(3) &amp;lt; 0 and IS_BANK_ACCOUNT = 'N') ,fabs(Column(3)),0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,Group, SubGroup))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you would need to replace the column(3) references with the full expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 12:53:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090267#M919167</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-06T12:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: zero total value while using function in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090268#M919169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are more simplified version of the expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD = 2 and (fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT))) &amp;gt; 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD = 1 and (fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT))) &amp;gt; 0 and IS_BANK_ACCOUNT = 'Y')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD = 1 and (fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT))) &amp;lt; 0 and IS_BANK_ACCOUNT = 'N'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fabs((fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)))),0), Group, Subgroup))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD = 2 and (fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT))) &amp;lt; 0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD = 1 and (fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT))) &amp;lt; 0 and IS_BANK_ACCOUNT = 'Y')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(GL_HEAD = 1 and (fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT))) &amp;gt; 0 and IS_BANK_ACCOUNT = 'N'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fabs((fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)) - fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)))),0), Group, Subgroup))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/123752_Capture.PNG" style="height: 290px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 12:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090268#M919169</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-06T12:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: zero total value while using function in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090269#M919172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On totals you can't use that (bold marked):&lt;/P&gt;&lt;P&gt;if ((&lt;STRONG&gt;GL_HEAD=1&lt;/STRONG&gt; and Column(3) &amp;gt; 0 and &lt;STRONG&gt;IS_BANK_ACCOUNT = 'N'&lt;/STRONG&gt;) OR (&lt;STRONG&gt;GL_HEAD=1&lt;/STRONG&gt; and Column(3) &amp;lt; 0 and &lt;STRONG&gt;IS_BANK_ACCOUNT = 'Y'&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;Because dimension values have a lot of data, and IF is not an accumulative expression.&lt;/P&gt;&lt;P&gt;Change Column(3) for the formulas, and aggregate it:&lt;/P&gt;&lt;P&gt;For inflow expression:&lt;/P&gt;&lt;P&gt;sum(aggr(&lt;/P&gt;&lt;P&gt;if (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (GL_HEAD = 2 and sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup))-sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)) &amp;gt; 0) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or (GL_HEAD=1 and sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup))-sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)) &amp;gt; 0 and IS_BANK_ACCOUNT = 'Y') &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; or (GL_HEAD=1 and sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup))-sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)) &amp;lt; 0 and IS_BANK_ACCOUNT = 'N'),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fabs(sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMinDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup))-sum(aggr(fabs(sum({&amp;lt;DOCUMENT_DATE={"&amp;lt;=$(vMaxDate)"},GL_HEAD={'1','2'}&amp;gt;}LOCAL_AMOUNT)),Group,Subgroup)))&lt;/P&gt;&lt;P&gt;,0),Group,Subgroup))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 12:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/zero-total-value-while-using-function-in-qlikview/m-p/1090269#M919172</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-06T12:58:38Z</dc:date>
    </item>
  </channel>
</rss>

