<?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: Aggr fonction in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320605#M831663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT Dossier_Id)/Count(DISTINCT &lt;SPAN style="color: #ff0000;"&gt;TOTAL &amp;lt;Dos_CreaYear&amp;gt;&lt;/SPAN&gt; Dossier_Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jun 2017 11:21:51 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-06-20T11:21:51Z</dc:date>
    <item>
      <title>Aggr fonction</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320604#M831662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with aggr fonction : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need t show the % of dossiers by Doss_Fase per year in a pivot table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this Expression : count(distinct Dossier_Id)/aggr(count(distinct Dossier_Id), Dos_CreaYear) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and getting this result : &lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="0" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TH bgcolor="#f5f5f5" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Dos_CreaYear&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH bgcolor="#f5f5f5" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Dos_FaseDescrFR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;# Dossiers&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;% Dossiers&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" rowspan="3"&gt;&lt;SPAN style="color: #363636;"&gt;2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Amiable&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3495&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;85%&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Judiciare&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;615&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;Total &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;4110 &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;100% &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" rowspan="3"&gt;&lt;SPAN style="color: #363636;"&gt;2014&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Amiable&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2172&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;80%&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Judiciare&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;530&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;Total &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;2702 &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;100% &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff" rowspan="3"&gt;&lt;SPAN style="color: #363636;"&gt;2013&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Amiable&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2518&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;79%&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Judiciare&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;680&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;Total &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;3198 &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;100% &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;Total &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;10010 &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do somone know why it's not showing the Judiciaire ratio ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help&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/Aggr-fonction/m-p/1320604#M831662</guid>
      <dc:creator>marwen_garwachi</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr fonction</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320605#M831663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT Dossier_Id)/Count(DISTINCT &lt;SPAN style="color: #ff0000;"&gt;TOTAL &amp;lt;Dos_CreaYear&amp;gt;&lt;/SPAN&gt; Dossier_Id)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 11:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320605#M831663</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-20T11:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr fonction</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320606#M831664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you have not included Dos_FaseDescrFR as a dimension in the Aggr(). But before you add it, I don't think you need an aggr() here. Something like&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;&lt;BR /&gt;&lt;/SPAN&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;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct Dossier_Id) / Count(distinct total&amp;lt;Dos_CreaYear&amp;gt; Dossier_Id)&lt;/EM&gt;&lt;/SPAN&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;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&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;should work (correct any field names or syntax errors). If not I, suggest that you post a&amp;nbsp; sample qvw file with enough sample data and the table excluding the % calculation.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 11:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320606#M831664</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-06-20T11:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr fonction</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320607#M831665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it works ! Dan you explain what was wrong in my expression and what's the right syntaxe to use in this case ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advence !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 11:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320607#M831665</guid>
      <dc:creator>marwen_garwachi</dc:creator>
      <dc:date>2017-06-20T11:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr fonction</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320608#M831666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it works too...i didn't know that i can use distinct total &amp;lt;dimension&amp;gt;...now i know but i still need to &lt;SPAN lang="en"&gt;control the syntaxe...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 11:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320608#M831666</guid>
      <dc:creator>marwen_garwachi</dc:creator>
      <dc:date>2017-06-20T11:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr fonction</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320609#M831667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you were seeing was one of the &lt;A href="https://community.qlik.com/qlik-blogpost/4418"&gt;Pitfalls of the Aggr function&lt;/A&gt;‌. Specifically, its called grain mis-match... you can address the issue by using NODISTINCT&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;&lt;STRONG&gt;Count(DISTINCT Dossier_Id)/Aggr(NODISTINCT Count(DISTINCT Dossier_Id), Dos_CreaYear)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which will ensure that you have value for your denominator for each row (Without NODISTINCT, the value is only populated on just one of the many recurrences of Dos_CreaYear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We (Me and &lt;A href="https://community.qlik.com/people/jontydkpi"&gt;jontydkpi&lt;/A&gt;‌) proposed an alternative, which is much better than using Aggr() to find the total of your count for each Dos_CreaYear using TOTAL function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 11:31:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-fonction/m-p/1320609#M831667</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-20T11:31:12Z</dc:date>
    </item>
  </channel>
</rss>

