<?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 Problems with the average of an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-with-the-average-of-an-expression/m-p/198174#M57582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you tried using the aggr() function to get an average. Something like -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(aggr((Sum({$&amp;lt;[Bokslut (KSEK)]={'Resultat efter finansnetto'}&amp;gt;} Bokslut)&lt;B&gt;)&lt;/B&gt; /&lt;/P&gt;&lt;P&gt;(sum({$&amp;lt;[Bokslut (KSEK)]={'Omsättning'}&amp;gt;} Bokslut)),SomeField))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to replace the 'SomeField' value with an appropriate field to aggregate over.&lt;/P&gt;&lt;P&gt;I hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Feb 2011 00:25:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-04T00:25:32Z</dc:date>
    <item>
      <title>Problems with the average of an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-the-average-of-an-expression/m-p/198172#M57580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to calculate the average of this expression (below).&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;(Sum({$&amp;lt;[Bokslut (KSEK)]={'Resultat efter finansnetto'}&amp;gt;} Bokslut)&lt;B&gt;)&lt;/B&gt; /&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;(sum({$&amp;lt;[Bokslut (KSEK)]={'Omsättning'}&amp;gt;} Bokslut))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the average of the total. I have tried a lot of different varieties with TOTAL and Avg. Avg(TOTAL.......). But with no success!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 17:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-the-average-of-an-expression/m-p/198172#M57580</guid>
      <dc:creator />
      <dc:date>2011-02-02T17:19:54Z</dc:date>
    </item>
    <item>
      <title>Problems with the average of an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-the-average-of-an-expression/m-p/198173#M57581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I amy be missing something but I'd try:&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;((Sum({$&amp;lt;[Bokslut (KSEK)]={'Resultat efter finansnetto'}&amp;gt;} Bokslut)) / (sum({$&amp;lt;[Bokslut (KSEK)]={'Omsättning'}&amp;gt;} Bokslut))) /&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;((count({$&amp;lt;[Bokslut (KSEK)]={'Resultat efter finansnetto'}&amp;gt;} Bokslut)) +&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;(count({$&amp;lt;[Bokslut (KSEK)]={'Omsättning'}&amp;gt;} Bokslut)))&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;Simply the sum of your expression divided by the number of values that are contained in that expression.&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;Hope that helps,&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 18:29:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-the-average-of-an-expression/m-p/198173#M57581</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2011-02-02T18:29:32Z</dc:date>
    </item>
    <item>
      <title>Problems with the average of an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-the-average-of-an-expression/m-p/198174#M57582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you tried using the aggr() function to get an average. Something like -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(aggr((Sum({$&amp;lt;[Bokslut (KSEK)]={'Resultat efter finansnetto'}&amp;gt;} Bokslut)&lt;B&gt;)&lt;/B&gt; /&lt;/P&gt;&lt;P&gt;(sum({$&amp;lt;[Bokslut (KSEK)]={'Omsättning'}&amp;gt;} Bokslut)),SomeField))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to replace the 'SomeField' value with an appropriate field to aggregate over.&lt;/P&gt;&lt;P&gt;I hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 00:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-the-average-of-an-expression/m-p/198174#M57582</guid>
      <dc:creator />
      <dc:date>2011-02-04T00:25:32Z</dc:date>
    </item>
  </channel>
</rss>

