<?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 2 aggr function in single expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284644#M402367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have two database (old and new database).suppose database 1 have the amount up to mid of the 2015 year.&lt;/P&gt;&lt;P&gt;Database 2 have amount start from mid of the 2015 year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have merged both database dimensions,amount etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression is:&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;aggr(sum({&amp;lt;Flag={'B'}&amp;gt;}TOT_TAX_AMT),TAX_CODE)&lt;/STRONG&gt;+&lt;STRONG&gt;sum({&amp;lt;Flag={'A'}&amp;gt;}aggr(only(TOTAL_REVENUE),key))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both database sum is shown in upper expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see aggr is used in both parts of the expression. Due to 2 aggr function in the single expression, the year 2015 amount is not showing on the table. But for 2017,2016,2014,2013, the amount is coming in the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I am not taking dimension in the table, I am only showing expression in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how to sort out this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narender&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Mar 2017 09:36:44 GMT</pubDate>
    <dc:creator>narender123</dc:creator>
    <dc:date>2017-03-27T09:36:44Z</dc:date>
    <item>
      <title>2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284644#M402367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have two database (old and new database).suppose database 1 have the amount up to mid of the 2015 year.&lt;/P&gt;&lt;P&gt;Database 2 have amount start from mid of the 2015 year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have merged both database dimensions,amount etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression is:&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;aggr(sum({&amp;lt;Flag={'B'}&amp;gt;}TOT_TAX_AMT),TAX_CODE)&lt;/STRONG&gt;+&lt;STRONG&gt;sum({&amp;lt;Flag={'A'}&amp;gt;}aggr(only(TOTAL_REVENUE),key))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both database sum is shown in upper expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see aggr is used in both parts of the expression. Due to 2 aggr function in the single expression, the year 2015 amount is not showing on the table. But for 2017,2016,2014,2013, the amount is coming in the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I am not taking dimension in the table, I am only showing expression in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how to sort out this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narender&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 09:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284644#M402367</guid>
      <dc:creator>narender123</dc:creator>
      <dc:date>2017-03-27T09:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: 2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284645#M402368</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;could it be that you just need to aggregate the first Expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;sum(&lt;/SPAN&gt;aggr(sum({&amp;lt;Flag={'B'}&amp;gt;}TOT_TAX_AMT),TAX_CODE)&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;+&lt;STRONG&gt;sum({&amp;lt;Flag={'A'}&amp;gt;}aggr(only(TOTAL_REVENUE),key))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 10:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284645#M402368</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2017-03-27T10:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: 2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284646#M402369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If DB1 and DB2 same structure and then call up using concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DB1:&lt;/P&gt;&lt;P&gt;Select Flag, TOT_TAX_AMT, TAX_CODE, Key;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;DB2:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Select Flag, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TOTAL_REVENUE&lt;/STRONG&gt; &lt;STRONG&gt;as TOT_TAX_AMT&lt;/STRONG&gt;, Key;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Then may be this?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Aggr(Sum({&amp;lt;Flag = {'A', 'B'}&amp;gt;} TOTAL_REVENUE),Key)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 10:13:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284646#M402369</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-03-27T10:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: 2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284647#M402370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="font-color-meta" style="padding: 0 0 5px; font-size: 1.2em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #8b8b8b; background-color: #e6e6e6;"&gt;&lt;SPAN class="replyToName" style="font-weight: inherit; font-style: inherit; font-size: 15.6px; font-family: inherit;"&gt;Johansson&lt;/SPAN&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is Showing wrong data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narender&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 10:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284647#M402370</guid>
      <dc:creator>narender123</dc:creator>
      <dc:date>2017-03-27T10:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: 2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284648#M402371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;Both db has different structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narender&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 10:40:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284648#M402371</guid>
      <dc:creator>narender123</dc:creator>
      <dc:date>2017-03-27T10:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: 2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284649#M402372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you share sample application&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 10:42:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284649#M402372</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-03-27T10:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: 2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284650#M402373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cant share with you.Because it has multiple dimension and script created in multiple phases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 11:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284650#M402373</guid>
      <dc:creator>narender123</dc:creator>
      <dc:date>2017-03-27T11:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: 2 aggr function in single expression</title>
      <link>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284651#M402374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem. We only need the final QVW without script or DBs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 11:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-aggr-function-in-single-expression/m-p/1284651#M402374</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-03-27T11:38:18Z</dc:date>
    </item>
  </channel>
</rss>

