<?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: Use Aggr function twice in calculation? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059836#M16992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, I could not resolve adding FECHA. But you've helped me a lot with your formula, I just took the FECHA field and added the 0,01.&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;Avg (aggr (Count (Aggr (If (Sum (VALO)&amp;gt; 0&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: red;"&gt;,01&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;, DOC_CLI), DOC_CLI)) * COUNT (DISTINCT DATE), DOC_CLI))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 May 2016 19:33:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-05T19:33:48Z</dc:date>
    <item>
      <title>Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059816#M16972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I use the Aggr function &lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;twice&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;within the same calculation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: Avg(&lt;STRONG&gt;Aggr&lt;/STRONG&gt;(Count(&lt;STRONG&gt;Aggr&lt;/STRONG&gt;(If...,Field))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Message was edited by Community Moderator for clarity.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 21:08:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059816#M16972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-02T21:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059817#M16973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 21:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059817#M16973</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-02T21:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059818#M16974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on what you are trying to do. If you want to know if the syntax is allowed, yes it is. But what exactly do you need this for? May be share a sample with your expected output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 00:50:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059818#M16974</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-03T00:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059819#M16975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh, I thought it was wrong and could not be used 2 times, as it gave me error, invalid function. I'll keep trying and if not inform you and explain the function and related fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 11:12:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059819#M16975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-03T11:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059820#M16976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe we can help you better if you post the full expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advanced aggregation always shows a single expression and one or more dimension fields as arguments to aggr() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 12:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059820#M16976</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-03T12:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059821#M16977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl, &lt;/P&gt;&lt;P&gt;Step formula here where I have the inchoerencia: &lt;STRONG&gt;&lt;EM&gt;Avg (Aggr (&lt;/EM&gt;&lt;/STRONG&gt;Count (Aggr (If (Sum (VALO)&amp;gt; 0, DOC_CLI), DOC_CLI)) * COUNT (DISTINCT DATE))&lt;EM&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So yes I instead works: Count (Aggr (If (Sum (VALO)&amp;gt; 0, DOC_CLI), DOC_CLI)) * COUNT (DISTINCT DATE)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I need to average this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is why we consult them if they could include two Aggr, how can I fix it? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 13:19:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059821#M16977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T13:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059822#M16978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3208"&gt;Average – Which average?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what is the&lt;EM&gt; internal grouping entity&lt;/EM&gt; in your case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 16:50:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059822#M16978</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-04T16:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059823#M16979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Hi Sunny, Step formula here where I have the inchoerencia: &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;Avg (Aggr (&lt;/EM&gt;&lt;/STRONG&gt;Count (Aggr (If (Sum (VALO)&amp;gt; 0, DOC_CLI), DOC_CLI)) * COUNT (DISTINCT DATE))&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;)&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;So yes I instead works: Count (Aggr (If (Sum (VALO)&amp;gt; 0, DOC_CLI), DOC_CLI)) * COUNT (DISTINCT DATE)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;I need to average this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;This is why we consult them if they could include two Aggr, how can I fix it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 18:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059823#M16979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T18:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059824#M16980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope to be more explanatory, you can not clearly see the solution in the link you shared me.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/123590_Captura.PNG" style="height: 459px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 19:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059824#M16980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T19:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059825#M16981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;Sum(Aggr(&lt;/SPAN&gt;Count(Aggr(If(Sum(VALO) &amp;gt; 0, DOC_CLI), DOC_CLI)) * Count(DISTINCT DATE)&lt;SPAN style="color: #ff0000;"&gt;, DOC_CLI))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;Sum(Aggr(&lt;/SPAN&gt;Count(Aggr(If(Sum(VALO) &amp;gt; 0, DOC_CLI), DOC_CLI&lt;SPAN style="color: #ff0000;"&gt;, FECHA&lt;/SPAN&gt;)) * Count(DISTINCT DATE)&lt;SPAN style="color: #ff0000;"&gt;, DOC_CLI))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 19:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059825#M16981</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T19:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059826#M16982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Sum(Aggr(If(Sum(VALO) &amp;gt; 0, 1), DOC_CLI&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;, FECHA&lt;/SPAN&gt;)) &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 20:03:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059826#M16982</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-04T20:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059827#M16983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Thanks Sunny and Swuehl for your time, could generate a formula for the KPI with the Avg (Aggr ... function as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: red;"&gt;Avg ( aggr&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt; (Count (Aggr(If(Sum(VALO) &amp;gt; 0, DOC_CLI), DOC_CLI))*Count (distinct FECHA)&lt;SPAN style="color: red;"&gt;, DOC_CLI))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I added what's in Red to the original formula I passed them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But on average I still counting DOC_CLI with zero VALO not know why, if determined Sum (VALO)&amp;gt; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, something happens on the basis of this contradiction?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 21:03:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059827#M16983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-04T21:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059828#M16984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;I think you need to add FECHA as a dimension to your inner aggregation&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 21:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059828#M16984</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T21:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059829#M16985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason is that you are checking &lt;STRONG&gt;Sum(VALO) &amp;gt; 0&lt;/STRONG&gt; on not just your 1st dimension,but on FECHA and 1st dim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: red;"&gt;&lt;STRONG style="color: #575757;"&gt;Avg(Aggr&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;(Count(Aggr(If(Sum(VALO) &amp;gt; 0, DOC_CLI), DOC_CLI&lt;SPAN style="color: #ff0000;"&gt;, FECHA&lt;/SPAN&gt;))*Count (Distinct FECHA)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 14.6667px; font-family: inherit; color: red;"&gt;&lt;STRONG style="color: #575757;"&gt;, DOC_CLI))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 21:16:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059829#M16985</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T21:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059830#M16986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you expect to get for your sample data? 1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still think you could calculate this like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(Aggr(If(Sum(VALOR) &amp;gt; 0, 1), DOC_CLI, FECHA)) / Count(DISTINCT DOC_CLI)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: Attached sample QVF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 21:25:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059830#M16986</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-04T21:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059831#M16987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny!, I added this but I went a little higher, the closest number I could achieve as follows:&lt;/P&gt;&lt;P&gt;Avg (aggr (Count (Aggr (If (Sum (VALO)&amp;gt; 0&lt;SPAN style="color: red;"&gt;,01&lt;/SPAN&gt;, DOC_CLI), DOC_CLI)) * COUNT (DISTINCT DATE), DOC_CLI))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I was going to fix this by adding DATE on the inner agregation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you recommend any article where I explain clearly how they should be structures functions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 11:21:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059831#M16987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-05T11:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059832#M16988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;swuehl, I have a lot of data, I expect you to tell me how much DATE on average than DOC_CLI have VALO greater than zero.&lt;/P&gt;&lt;P&gt;It gives me a number, such as 1.006752&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 11:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059832#M16988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-05T11:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059833#M16989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the issue is not resolved by adding FECHA/DATE in your inner aggregation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 14:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059833#M16989</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-05T14:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059834#M16990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the sample file I've attached to my previous post? &lt;/P&gt;&lt;P&gt;Can you tell if this is showing what you expect to see, or if not, what exactely deviates from your expectation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 17:14:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059834#M16990</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-05T17:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Use Aggr function twice in calculation?</title>
      <link>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059835#M16991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I was wrong copying the formula, had put Sum (VALO&lt;STRONG&gt;&lt;EM&gt;R&lt;/EM&gt;&lt;/STRONG&gt;) and I copied as is and was Sum (VALO) without the R. &lt;/P&gt;&lt;P&gt;Then I served the function, but I was the same as before, me or just averages the documents that have VALO = zero day, I pulled the index down.&lt;/P&gt;&lt;P&gt;I would also like to understand the logic of your proposal, why have to put 0, 1 and after this DOC_CLI, DATE, what I'm saying to logic when I close the parenthesis and write the name of the fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(If(Sum(VALO) &amp;gt; &lt;STRONG style="color: red;"&gt;0, 1&lt;/STRONG&gt;), &lt;STRONG style="color: red;"&gt;DOC_CLI, FECHA&lt;/STRONG&gt;)) / Count(DISTINCT DOC_CLI)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 19:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Use-Aggr-function-twice-in-calculation/m-p/1059835#M16991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-05T19:22:22Z</dc:date>
    </item>
  </channel>
</rss>

