<?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 Total % in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089774#M89328</link>
    <description>&lt;P&gt;Dear Mr BrunPierre&lt;/P&gt;
&lt;P&gt;Qlik cannot accept than this, please see below :&lt;/P&gt;
&lt;P&gt;LOAD &lt;BR /&gt;Factory,&lt;BR /&gt;Rental&lt;BR /&gt;FROM&lt;BR /&gt;[Data-1.xls]&lt;BR /&gt;(biff, embedded labels, table is Sheet1$)&lt;BR /&gt;Where Len(Trim(Rental)) &amp;gt; 0 ;&lt;BR /&gt;than this; &amp;lt;----------------- error&lt;/P&gt;
&lt;P&gt;LOAD &lt;BR /&gt;Factory,&lt;BR /&gt;Alt(Rental, 0) as Rental&lt;BR /&gt;FROM&lt;BR /&gt;[Data-1.xls]&lt;BR /&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;
&lt;P&gt;Regards, Tracy&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Jul 2023 12:54:11 GMT</pubDate>
    <dc:creator>tracycrown</dc:creator>
    <dc:date>2023-07-02T12:54:11Z</dc:date>
    <item>
      <title>Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089739#M89321</link>
      <description>&lt;P&gt;Dear all&lt;/P&gt;
&lt;P&gt;Kindly advise how to compute the correct average total% of 20%, 16.7% is wrong.&lt;/P&gt;
&lt;P&gt;Thank you, Tracy&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jul 2023 15:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089739#M89321</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2023-07-01T15:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089757#M89323</link>
      <description>&lt;P&gt;I don't have the tool to open your sample qvw at the moment &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;,&amp;nbsp; but &amp;nbsp;the looks of your Excel I suggest that you have trouble getting the correct average due to one row with no value.&lt;/P&gt;
&lt;P&gt;Try these expressions&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;avg(Rental)/sum(total Rental)&lt;/LI&gt;
&lt;LI&gt;avg(total Rental)/sum(total Rental)&lt;/LI&gt;
&lt;LI&gt;(avg(Rental)/sum(total Rental))-avg(total Rental)/sum(total Rental)&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sun, 02 Jul 2023 05:59:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089757#M89323</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2023-07-02T05:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089759#M89324</link>
      <description>&lt;P&gt;Dear Mr Vegar&lt;/P&gt;
&lt;P&gt;You have resolved all my problems. Thank you very much, you are the best.&lt;/P&gt;
&lt;P&gt;Can you advise the following with examples :&lt;/P&gt;
&lt;P&gt;1. Eliminate all records in script for records without value.&lt;/P&gt;
&lt;P&gt;2. Replace all records in script with zero for records without value instead of '-'&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some suggested using Alt (Rental) or Isnull(Rental), can you also give me some examples.&lt;/P&gt;
&lt;P&gt;Thank you very much, Tracy&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 06:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089759#M89324</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2023-07-02T06:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089760#M89325</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28151"&gt;@tracycrown&lt;/a&gt; This normally does the trick of restricting the load of the null value.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;LOAD *, FROM Source Where Len(Trim(Rental)) &amp;gt; 0 ;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Indeed, You can replace any NULL value with 0 (zero) by using the function ALT, in your case, like this.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Alt(Rental, 0) as Rental&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This will be &lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;efficient where there are multiple fields.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;SET NULLINTERPRET='-';&lt;BR /&gt;NullAsValue Rental, Field1,Field2 ;&lt;BR /&gt;Set NullValue = 0;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 08:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089760#M89325</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-07-02T08:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089761#M89326</link>
      <description>&lt;P&gt;Dear Mr BrunPierre&lt;/P&gt;
&lt;P&gt;Can you use my attached rental file to illustrate your solution ?&lt;/P&gt;
&lt;P&gt;Thank you, Tracy&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 08:09:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089761#M89326</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2023-07-02T08:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089764#M89327</link>
      <description>&lt;P&gt;Of the two, this is a better approach&lt;/P&gt;
&lt;P&gt;LOAD Factory,&lt;BR /&gt;Rental&lt;/P&gt;
&lt;P&gt;FROM [...\Data-1.xls] (biff, embedded labels, table is Sheet1$)&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Where Len(Trim(Rental)) &amp;gt; 0 ;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;than this;&lt;/P&gt;
&lt;P&gt;LOAD Factory,&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Alt(Rental, 0) as Rental&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;FROM [...\Data-1.xls] (biff, embedded labels, table is Sheet1$);&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 09:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089764#M89327</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-07-02T09:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089774#M89328</link>
      <description>&lt;P&gt;Dear Mr BrunPierre&lt;/P&gt;
&lt;P&gt;Qlik cannot accept than this, please see below :&lt;/P&gt;
&lt;P&gt;LOAD &lt;BR /&gt;Factory,&lt;BR /&gt;Rental&lt;BR /&gt;FROM&lt;BR /&gt;[Data-1.xls]&lt;BR /&gt;(biff, embedded labels, table is Sheet1$)&lt;BR /&gt;Where Len(Trim(Rental)) &amp;gt; 0 ;&lt;BR /&gt;than this; &amp;lt;----------------- error&lt;/P&gt;
&lt;P&gt;LOAD &lt;BR /&gt;Factory,&lt;BR /&gt;Alt(Rental, 0) as Rental&lt;BR /&gt;FROM&lt;BR /&gt;[Data-1.xls]&lt;BR /&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;
&lt;P&gt;Regards, Tracy&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 12:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089774#M89328</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2023-07-02T12:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089824#M89334</link>
      <description>&lt;P&gt;They're two different load scripts for handling null values.&lt;/P&gt;
&lt;P&gt;This restricts the load of null values,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;LOAD Factory,&lt;BR /&gt;Rental&lt;/P&gt;
&lt;P&gt;FROM [...\Data-1.xls] (biff, embedded labels, table is Sheet1$)&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Where Len(Trim(Rental)) &amp;gt; 0 ;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;While this replaces any NULL value with 0.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;LOAD Factory,&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Alt(Rental, 0) as Rental&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;FROM [...\Data-1.xls] (biff, embedded labels, table is Sheet1$);&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 03 Jul 2023 06:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089824#M89334</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-07-03T06:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Average Total %</title>
      <link>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089938#M89346</link>
      <description>&lt;P&gt;Dear Mr BrunPierre&lt;/P&gt;
&lt;P&gt;For Multiple fields, am I correct to put the below statements at the beginning of the script before loading the file. For example :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;SET NULLINTERPRET='-';&lt;BR /&gt;NullAsValue Rental, Act_Value, Bud_Value ;&lt;BR /&gt;Set NullValue = 0;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;Load Factory,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;Rental,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;Act_Value,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;Bud_Value&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="lia-message-unread lia-message-unread-windows"&gt;&lt;SPAN&gt;FROM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Data-1.xls]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(biff, embedded labels, table is Sheet1$)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&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, 03 Jul 2023 10:20:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Average-Total/m-p/2089938#M89346</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2023-07-03T10:20:33Z</dc:date>
    </item>
  </channel>
</rss>

