<?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: Ignore empty value in weighted average calculation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ignore-empty-value-in-weighted-average-calculation/m-p/1886010#M72985</link>
    <description>&lt;P&gt;my first thought is: build a flag for this condition in the script and put it in a set-analysis.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Load *,
   if (len(trim(n5_fi_sprdcap_tt_touch))=0,1,0) as isNull
resident table;&lt;/LI-CODE&gt;
&lt;P&gt;And then you can exclude it in the Set-Analysis: {&amp;lt;isNull={0}&amp;gt;}.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 11:55:42 GMT</pubDate>
    <dc:creator>chris_djih</dc:creator>
    <dc:date>2022-01-27T11:55:42Z</dc:date>
    <item>
      <title>Ignore empty value in weighted average calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Ignore-empty-value-in-weighted-average-calculation/m-p/1884556#M72861</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the below formula that calculates a weighted average.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(Total n5_fi_sprdcap_tt_touch * Aggr(Sum(n5_fi_value_EUR), n5_fi_sprdcap_tt_touch)) / Sum(Total Aggr(Sum(n5_fi_value_EUR), n5_fi_sprdcap_tt_touch))&lt;/P&gt;
&lt;P&gt;How can I adapt this so that it only calculates the weighted average where n5_fi_sprdcap_tt_touch is not null? At the moment it will calculate including it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:24:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignore-empty-value-in-weighted-average-calculation/m-p/1884556#M72861</guid>
      <dc:creator>johnnyjohn</dc:creator>
      <dc:date>2022-01-24T14:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore empty value in weighted average calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Ignore-empty-value-in-weighted-average-calculation/m-p/1886010#M72985</link>
      <description>&lt;P&gt;my first thought is: build a flag for this condition in the script and put it in a set-analysis.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Load *,
   if (len(trim(n5_fi_sprdcap_tt_touch))=0,1,0) as isNull
resident table;&lt;/LI-CODE&gt;
&lt;P&gt;And then you can exclude it in the Set-Analysis: {&amp;lt;isNull={0}&amp;gt;}.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 11:55:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignore-empty-value-in-weighted-average-calculation/m-p/1886010#M72985</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-01-27T11:55:42Z</dc:date>
    </item>
  </channel>
</rss>

