<?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: IF  AGGR COUNT in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423773#M802975</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;If(&amp;nbsp;&amp;nbsp; sum(Aggr(count( DISTINCT{&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [N° Cde]), [Code Client]))=2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;,sum([Ca Produit HT]))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Nov 2017 13:38:15 GMT</pubDate>
    <dc:creator>YoussefBelloum</dc:creator>
    <dc:date>2017-11-20T13:38:15Z</dc:date>
    <item>
      <title>IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423770#M802972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-size: 12pt; font-family: arial, sans-serif;"&gt;Hello, I would like to have the turnover of customers having 2 orders over a period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt;But my formula does not work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt; My order count is good &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt;Nb of order : count( DISTINCT{&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [N° Cde])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt;but not formula&amp;nbsp; :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Turnerover for 2 orders= If(&amp;nbsp;&amp;nbsp; Aggr(count( DISTINCT{&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [N° Cde]), [Code Client])=2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;,[Ca Produit HT])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/183904_Capture.JPG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;I need to aggr because in the end i need only one figure that will be the sum of all these clients&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;thanks for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #212121; font-family: arial, sans-serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&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/IF-AGGR-COUNT/m-p/1423770#M802972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423771#M802973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum(aggr(count(distinct.....),[code client]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:23:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423771#M802973</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2017-11-20T13:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423772#M802974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using this as your calculated dimension or is this an expression?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Turnerover for 2 orders = If(&amp;nbsp; Aggr(count( DISTINCT{&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [N° Cde]), [Code Client]) = 2&lt;/STRONG&gt;&lt;STRONG&gt;, [Ca Produit HT])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423772#M802974</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-20T13:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423773#M802975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;If(&amp;nbsp;&amp;nbsp; sum(Aggr(count( DISTINCT{&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [N° Cde]), [Code Client]))=2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;,sum([Ca Produit HT]))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423773#M802975</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-11-20T13:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423774#M802976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is an expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423774#M802976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-20T13:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423775#M802977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks but &lt;SPAN lang="en"&gt;how to get afterwards only the sum of all this in a single expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423775#M802977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-20T13:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423776#M802978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then you need to "wrap" a sum around the Expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="font-family: inherit; font-size: 12pt; font-style: inherit; font-weight: inherit;"&gt;sum(If(&amp;nbsp;&amp;nbsp; sum(Aggr(count( DISTINCT{&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [N° Cde]), [Code Client]))=2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="font-family: inherit; font-size: 12pt; font-style: inherit; font-weight: inherit;"&gt;,([Ca Produit HT])))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423776#M802978</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2017-11-20T13:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423777#M802979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry it doesn't work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 14:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423777#M802979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-20T14:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423778#M802980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here it is a single expression which will give the result you want, did you try it ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 14:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423778#M802980</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-11-20T14:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423779#M802981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;[Code Client] = {"=Count(DISTINCT {&amp;lt;[Date Commande]={""&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)""}&amp;gt;} [N° Cde]) = 2"}&amp;gt;} [Ca Produit HT])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 14:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423779#M802981</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-20T14:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423780#M802982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it's perfect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 14:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423780#M802982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-20T14:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423781#M802983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree that it doesn't work (at least in Sense). I get the error "Nested aggregation is not allowed."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 15:00:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423781#M802983</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-11-20T15:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423782#M802984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you have an answer that works, but here is another alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do multiple levels of aggregation, but according to this thread &lt;A href="https://community.qlik.com/thread/120451"&gt;nested aggregation not allowed&lt;/A&gt; the AGGR function and the aggregation functions need to be interspersed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a function that does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15111995070775044" jivemacro_uid="_15111995070775044" modifiedtitle="true"&gt;
&lt;P&gt;=&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Sum(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(Sum( Aggr(Count(distinct {$&amp;lt;Date = {"&amp;gt;10/10/2016"}&amp;gt;} OrderNum), Client))=2, Sum(Amount)), &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Client&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, it uses your count function, discards any non-2 order counts, aggregates by client on the total amount, aggregates again on these values, and sums it all up. Pretty complex, but it's an interesting exercise in understanding how AGGR functions work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached a sample qlik sense application that you can check out to verify that this works. Sorry, I don't have QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s., note to other posters - I know we are all busy - but can you please at least give a one or two sentence explanation for your answers? How are we supposed to learn how to do this ourselves if you don't explain your answer. Remember, math class? Show your work! (Coming from a former math teacher).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 17:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423782#M802984</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-11-20T17:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423783#M802985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you not understand about the expression I posted?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({&amp;lt;[Code Client] = {"=Count(DISTINCT {&amp;lt;[Date Commande]={""&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)""}&amp;gt;} [N° Cde]) = 2"}&amp;gt;} [Ca Produit HT])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am doing a summation of &lt;STRONG&gt;[Ca Produit HT]&lt;/STRONG&gt; where this condition met for Code Client -&amp;gt; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(DISTINCT {&amp;lt;[Date Commande]={""&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)""}&amp;gt;} [N° Cde]) = 2&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 17:53:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423783#M802985</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-20T17:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423784#M802986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, specifically, on first look I was having trouble understanding how your double-quotation marks are functioning here. I suppose that the inner double-double marks "" serve as a sort of escape character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to accuse you specifically - you are obviously trying to be helpful - but I think there is sometimes a culture of "look what I can do" on these forums. I.e., trying to prove that you can do what the OP couldn't do, really quickly. That's fine if the OP needs a fix right now, but many of us use these forums to actually learn. And in that case, the one line solution is not the best thing. I'm not accusing you, specifically of that... it's just been getting on my nerves.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 18:04:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423784#M802986</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-11-20T18:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423785#M802987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/people/jonvitale"&gt;jonvitale&lt;/A&gt;‌ I see what you are coming from, and not to lie, I am probably a culprit of this myself. I can't promise I will change, but I will try to do better. Having said that, if you ever come across a post by me which you don't understand, please don't hesitate to seek explanation &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you are right about the usage of 2 double quotes.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4232"&gt;Escape sequences&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 18:11:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423785#M802987</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-20T18:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423786#M802988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general, I would suggest anyone to avoid Aggr() function if the Aggr() is done over a single dimension and use Set analysis search string option because of its efficiency benefit. A lot of the time we look for solutions and don't really care about efficiency, but I would suggest that if you have time, look for ways to make your expression better &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2017 18:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423786#M802988</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-20T18:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423787#M802989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif;"&gt;It's&amp;nbsp; true it's very difficult to do whithout aggr.&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: #212121;"&gt;I tried to do the same thing with this formula&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: #212121;"&gt;to calculate the sum of the delays between the first order and the second order for all customers and divide by the same number of customers to get an average time. This formula works but is very greedy resource.Do you have an idea? thank you for your help and time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif;"&gt;sum(aggr(Interval( min(&amp;nbsp; {&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [Date Commande],2)-min(&amp;nbsp; {&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [Date Commande],1),'D'),[Code Client])) &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif;"&gt; -sum( aggr(&amp;nbsp; Interval(&amp;nbsp; min(&amp;nbsp; {&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [Date Commande],2)-min(&amp;nbsp; {&amp;lt;[Date Commande]={"&amp;gt;=$(=vDateDébutAnnéeN) &amp;lt;=$(=vDateFinSeg)"}&amp;gt;} [Date Commande],1),'D')&amp;gt;=1,[Code Client])) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 08:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423787#M802989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-21T08:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423788#M802990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your chart dimension where you are using this? Or are you using this in a text box object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 09:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423788#M802990</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-21T09:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: IF  AGGR COUNT</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423789#M802991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in a text box object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 09:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AGGR-COUNT/m-p/1423789#M802991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-21T09:55:40Z</dc:date>
    </item>
  </channel>
</rss>

