<?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 How to calculate an average on calculated field excluding outliers in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-calculate-an-average-on-calculated-field-excluding/m-p/1639724#M47682</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've been facing the following issue, and could not find any solution on this forum. Here is the problem.&lt;/P&gt;&lt;P&gt;In the line chart below, the blue line represents the return on assets (RoA) of a company, and the red line the average of the return of assets for the whole group (ignore the filter on company_name : {&amp;lt;company_name=&amp;gt;}&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the big drop in 2018 on the red line is because 1 company has a RoA way below the average, as you can see on the distribution below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Distribution.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22325i15E490B53D0814DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Distribution.PNG" alt="Distribution.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 variables (vMax and vMin) which helps identify the outliers, i.e. if you are above vMax or below vMin then you are considered outlier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I want to do is to display in that line chart the average of RoA calculated over all companies except if their RoA is outside the acceptable range [vMin - vMax].&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I think I would be able to do it if the RoA was a field from my tables as I could put the condition in the&amp;nbsp; set expression. However the RoA is calculated as net_income / total_assets (net_income and total_assets are fields in my tables)and so I don't know how to write the set expression&lt;/P&gt;&lt;P&gt;Any help would be really appreciated&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:16:38 GMT</pubDate>
    <dc:creator>Sylvain77</dc:creator>
    <dc:date>2024-11-16T04:16:38Z</dc:date>
    <item>
      <title>How to calculate an average on calculated field excluding outliers</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-an-average-on-calculated-field-excluding/m-p/1639724#M47682</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've been facing the following issue, and could not find any solution on this forum. Here is the problem.&lt;/P&gt;&lt;P&gt;In the line chart below, the blue line represents the return on assets (RoA) of a company, and the red line the average of the return of assets for the whole group (ignore the filter on company_name : {&amp;lt;company_name=&amp;gt;}&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the big drop in 2018 on the red line is because 1 company has a RoA way below the average, as you can see on the distribution below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Distribution.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22325i15E490B53D0814DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Distribution.PNG" alt="Distribution.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 variables (vMax and vMin) which helps identify the outliers, i.e. if you are above vMax or below vMin then you are considered outlier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I want to do is to display in that line chart the average of RoA calculated over all companies except if their RoA is outside the acceptable range [vMin - vMax].&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I think I would be able to do it if the RoA was a field from my tables as I could put the condition in the&amp;nbsp; set expression. However the RoA is calculated as net_income / total_assets (net_income and total_assets are fields in my tables)and so I don't know how to write the set expression&lt;/P&gt;&lt;P&gt;Any help would be really appreciated&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-an-average-on-calculated-field-excluding/m-p/1639724#M47682</guid>
      <dc:creator>Sylvain77</dc:creator>
      <dc:date>2024-11-16T04:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate an average on calculated field excluding outliers</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-an-average-on-calculated-field-excluding/m-p/1639726#M47683</link>
      <description>&lt;P&gt;For some reason the line chart didn't make it into my post. Here it is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="line chart.PNG" style="width: 645px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22327i2B1F16AAE222ED39/image-size/large?v=v2&amp;amp;px=999" role="button" title="line chart.PNG" alt="line chart.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 03:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-an-average-on-calculated-field-excluding/m-p/1639726#M47683</guid>
      <dc:creator>Sylvain77</dc:creator>
      <dc:date>2019-10-25T03:18:02Z</dc:date>
    </item>
  </channel>
</rss>

