<?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: Average with negative values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969164#M1220480</link>
    <description>&lt;P&gt;I'm not sure what you mean with an adjusted average but both in the origin question mentioned methods may be adaptable for it - means: sum() / count() and/or rangeavg() - directly or combined with an aggr(), maybe like:&lt;/P&gt;
&lt;P&gt;avg(aggr(sum() / count() , Dim1, Dim2))&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;rangeavg(aggr(only(Value), Value))&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 13:05:47 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2022-08-16T13:05:47Z</dc:date>
    <item>
      <title>Average with negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969043#M1220473</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;On the left side the scores with some negative values and on the right side &lt;BR /&gt;the modified results&amp;nbsp;&lt;SPAN&gt;if I use &lt;EM&gt;f&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;EM&gt;abs( sum(score)/count(name))&lt;/EM&gt; or&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;RangeAvg(fabs(&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;score))&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;How can I keep the scores unchanged and also show the average value of them in my expression?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="avg.jpg" style="width: 350px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/86770i54BFFB61F64BE841/image-size/large?v=v2&amp;amp;px=999" role="button" title="avg.jpg" alt="avg.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 10:23:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969043#M1220473</guid>
      <dc:creator>17George</dc:creator>
      <dc:date>2022-08-16T10:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Average with negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969090#M1220475</link>
      <description>&lt;P&gt;You don't mentioned the place and context in which the values/results should be displayed. Therefore various approaches are thinkable, for example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;adding an extra field with positive/negative information&lt;/LI&gt;
&lt;LI&gt;using dual() values, like: dual(value, fabs(value))&lt;/LI&gt;
&lt;LI&gt;querying the dimensionality in a pivot, like if(dimensionality() = 0, fabs(value), value)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 11:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969090#M1220475</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-08-16T11:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Average with negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969100#M1220477</link>
      <description>&lt;P&gt;Use fabs() inside sum()&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;sum(fabs(score))/count(name)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 11:29:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969100#M1220477</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2022-08-16T11:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Average with negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969147#M1220479</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/76148"&gt;@marcus&lt;/a&gt;, &lt;BR /&gt;both suggestions,&amp;nbsp;&lt;SPAN&gt;dual( ) &amp;amp;&amp;nbsp;dimensionality()&lt;/SPAN&gt; worked as desired in my table.&lt;/P&gt;
&lt;P&gt;Is there a possibility to adjust the&amp;nbsp; results according to the weighted factor&amp;nbsp;of +/- signs?&lt;BR /&gt;For example: avg (-3, -7) = 5 and sum(-3,-7) = -10.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Since the negative sign is overweighing, &amp;nbsp;-5&amp;nbsp; might be adopted &amp;nbsp;as "adjusted"&amp;nbsp;average.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 12:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969147#M1220479</guid>
      <dc:creator>17George</dc:creator>
      <dc:date>2022-08-16T12:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average with negative values</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969164#M1220480</link>
      <description>&lt;P&gt;I'm not sure what you mean with an adjusted average but both in the origin question mentioned methods may be adaptable for it - means: sum() / count() and/or rangeavg() - directly or combined with an aggr(), maybe like:&lt;/P&gt;
&lt;P&gt;avg(aggr(sum() / count() , Dim1, Dim2))&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;rangeavg(aggr(only(Value), Value))&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:05:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-negative-values/m-p/1969164#M1220480</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-08-16T13:05:47Z</dc:date>
    </item>
  </channel>
</rss>

