<?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: Help with doing avg totals in table as a KPI Card in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071531#M87900</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/210216"&gt;@MassicotPSCU&lt;/a&gt;&amp;nbsp; try below expression in KPI&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=rangesum(Count(distinct{&amp;lt;Name={"=sum(Sales)=0"}&amp;gt;}Name), sum(Score))/ count(distinct Name)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 15 May 2023 19:57:50 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2023-05-15T19:57:50Z</dc:date>
    <item>
      <title>Help with doing avg totals in table as a KPI Card</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071376#M87880</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I've seen similar post like this but I'm not sure the solution provided is applicable to my expression. The solution requires set analysis but I'm not sure if or how to use set analysis to filter for nulls.&lt;/P&gt;
&lt;P&gt;I have this table:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 722px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/107191iE02FD9CACA2305E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also have this expression:&lt;/P&gt;
&lt;P&gt;=if(IsNull(avg([Score])),1,AVG([Score]))&lt;/P&gt;
&lt;P&gt;When sales value is blank a score of 1 is returned for the given name. My average in the total score row represents a value of 1.6 which is accurate. However, when I use this same expression in a KPI card I only get the average for the names with a populated sales value. I need the average for all names including the ones without a sales value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to directly transfer that value in the total's rows to a KPI chart or maybe fix my expression?&lt;/P&gt;
&lt;P&gt;Here is a similar post with a solution using set analysis and aggr() but it does not use set analysis to filter for nulls.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/td-p/1383348" target="_blank" rel="noopener"&gt;Solved: Totals in a table as a KPI - Qlik Community - 1383348&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 13:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071376#M87880</guid>
      <dc:creator>MassicotPSCU</dc:creator>
      <dc:date>2023-05-15T13:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with doing avg totals in table as a KPI Card</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071420#M87887</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=if(IsNull(avg(Total &amp;lt;Name&amp;gt; [Score])), 1, AVG(Total &amp;lt;Name&amp;gt; [Score]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 14:55:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071420#M87887</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2023-05-15T14:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with doing avg totals in table as a KPI Card</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071496#M87895</link>
      <description>&lt;P&gt;Hi thank you for your response. Unfortunately, I tried this, but I still get back the same incorrect result where it's only averaging the names with scores/sales.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 17:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071496#M87895</guid>
      <dc:creator>MassicotPSCU</dc:creator>
      <dc:date>2023-05-15T17:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with doing avg totals in table as a KPI Card</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071531#M87900</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/210216"&gt;@MassicotPSCU&lt;/a&gt;&amp;nbsp; try below expression in KPI&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=rangesum(Count(distinct{&amp;lt;Name={"=sum(Sales)=0"}&amp;gt;}Name), sum(Score))/ count(distinct Name)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 May 2023 19:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2071531#M87900</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2023-05-15T19:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with doing avg totals in table as a KPI Card</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2072404#M87962</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-doing-avg-totals-in-table-as-a-KPI-Card/m-p/2072404#M87962</guid>
      <dc:creator>MassicotPSCU</dc:creator>
      <dc:date>2023-05-17T12:05:33Z</dc:date>
    </item>
  </channel>
</rss>

