<?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: Aggregation - Average in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377400#M1168019</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;I tried various combinations of sum() and aggr(), but there is one thing I still couldn't solve.&lt;/P&gt;&lt;P&gt;I used the following formula to create the column performance(%)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(isNull(1-(SUM(OutSLA_Reaction)/SUM(AllIncidents))),Sum(total1),(1-(SUM(OutSLA_Reaction)/SUM(AllIncidents))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula works out fine, but I want to reuse it in a second column, because I need the total performance(%), e.g. 0.97 (97%)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use something like &lt;/P&gt;&lt;P&gt;sum(total column(1)) &lt;/P&gt;&lt;P&gt;and sum(aggr(column(1),PRIORITY,APPLICATION)&lt;/P&gt;&lt;P&gt;and various different combinations of sum() and aggr() to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimensions are &lt;/P&gt;&lt;P&gt;APPLICATION&lt;/P&gt;&lt;P&gt;PRIORITY&lt;/P&gt;&lt;P&gt;SEVERITY&lt;/P&gt;&lt;P&gt;NUMBERofINCIDENTS&lt;/P&gt;&lt;P&gt;OUTSLA_REACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone an idea why using sum() in combination with column(1) doesn't work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2012 07:23:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-16T07:23:01Z</dc:date>
    <item>
      <title>Aggregation - Average</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377396#M1168015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some difficulties with using aggregations, I hope someone might help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;Application&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Severity&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Count(Incident)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;Count(Out_of_sla)&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;1-(Count(out_of_sla)/Count(incident)&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;0,5&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0,67&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;0,3&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;0,1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0,75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;0,1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i need a field that calculates the arithmetic average, something Like &lt;/P&gt;&lt;P&gt;Sum(Severity*Count(Incident)) /Sum(Count(Incident)*Sum(1-Count((out_of_sla)/Count(incident))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how i can implement&amp;nbsp; this in QlikView?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Corinna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 12:06:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377396#M1168015</guid>
      <dc:creator />
      <dc:date>2012-08-13T12:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation - Average</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377397#M1168016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Corinna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to embed an aggregation function into another aggregation function (like a count() into a sum()), you'll need to use advanced aggregation (i.e. the aggr() function). Please check the help for the details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could come up with some more details (what are your dimensions), and some sample lines of input date (e.g. in an LOAD .. INLINE [...] style), I would assume someone here should be able to help you with the exact syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 12:30:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377397#M1168016</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-13T12:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation - Average</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377398#M1168017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you, I already tried to use the aggr() function but to no avail. Though I don't know whether I just messed up the syntax...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimensions should be Application, Priority (sorry, forgot about it in my previous post) and Severity.&lt;/P&gt;&lt;P&gt;Each Application has incidents with prio 1-4 and each prio has a corresponding severity. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment we use an excel sheet which should be transfered in QlikView. I attached the result in excel. Hope that might helps ( I need the formula for the fields "impact" and "average", whereas "impact" should be calculated as I described in my previous post)&lt;IMG __jive_id="20119" class="jive-image-thumbnail jive-image" onclick="" alt="Average.PNG" src="https://community.qlik.com/legacyfs/online/20119_Average.PNG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 07:04:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377398#M1168017</guid>
      <dc:creator />
      <dc:date>2012-08-14T07:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation - Average</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377399#M1168018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Corinna, could you post a sample excel file with input data and maybe also the expected outcome calculated with excel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or could you recheck your above formula,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum(Severity*Count(Incident)) /Sum(Count(Incident)*Sum(1-Count((out_of_sla)/Count(incident))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Count(oSLA) equals count(Incidents), this denominator will return zero, is this correct? Could be that I am a little confused, I think not all opening brackets have a closing counter part.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 08:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377399#M1168018</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-14T08:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation - Average</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377400#M1168019</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;I tried various combinations of sum() and aggr(), but there is one thing I still couldn't solve.&lt;/P&gt;&lt;P&gt;I used the following formula to create the column performance(%)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(isNull(1-(SUM(OutSLA_Reaction)/SUM(AllIncidents))),Sum(total1),(1-(SUM(OutSLA_Reaction)/SUM(AllIncidents))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula works out fine, but I want to reuse it in a second column, because I need the total performance(%), e.g. 0.97 (97%)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use something like &lt;/P&gt;&lt;P&gt;sum(total column(1)) &lt;/P&gt;&lt;P&gt;and sum(aggr(column(1),PRIORITY,APPLICATION)&lt;/P&gt;&lt;P&gt;and various different combinations of sum() and aggr() to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimensions are &lt;/P&gt;&lt;P&gt;APPLICATION&lt;/P&gt;&lt;P&gt;PRIORITY&lt;/P&gt;&lt;P&gt;SEVERITY&lt;/P&gt;&lt;P&gt;NUMBERofINCIDENTS&lt;/P&gt;&lt;P&gt;OUTSLA_REACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone an idea why using sum() in combination with column(1) doesn't work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 07:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation-Average/m-p/377400#M1168019</guid>
      <dc:creator />
      <dc:date>2012-08-16T07:23:01Z</dc:date>
    </item>
  </channel>
</rss>

