<?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: Calculate average over all dimensions instead of only dimensions with values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-average-over-all-dimensions-instead-of-only-dimensions/m-p/17619#M1187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may be best dealt with in the load script, if appropriate.&lt;/P&gt;&lt;P&gt;You can utilise the NullAsValue statement to set the null values to 0 for the necessary fields.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/NullAsValue.htm"&gt;this link&lt;/A&gt;‌ for further details about the NullAsValue statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2018 01:38:04 GMT</pubDate>
    <dc:creator>rachel_delany</dc:creator>
    <dc:date>2018-04-16T01:38:04Z</dc:date>
    <item>
      <title>Calculate average over all dimensions instead of only dimensions with values</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-average-over-all-dimensions-instead-of-only-dimensions/m-p/17618#M1186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to show a 0 value instead of - when there is no data available on certain dimensions (see image below). The reason i need this, is because i want to add another table which calculates the average per asset_nr_linked per activity_start_date. Now when i make this calculation, all values are summed up and divided by the count of asset with value. Instead I need to sum up all values and divide by all assets. The reason that there is no value shown is because there is no activity on that date for the asset. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Formula I use in this table: &lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;SAME_DATE = {'0'}&amp;gt;} aggr (ACTIVITY_END-ACTIVITY_START,ACTIVITY_START,ACTIVITY_END))&lt;/P&gt;&lt;P&gt;+ sum (aggr (frac (EXTRA_TIME_CURRENT_DATE),ACTIVITY_START,ACTIVITY_END))&lt;/P&gt;&lt;P&gt;+ above (sum(aggr(frac(EXTRA_TIME_NEXT_DATE),ACTIVITY_START,ACTIVITY_END)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Formula I want to use to calculate the average: &lt;/P&gt;&lt;P&gt;avg (aggr (Sum({$&amp;lt;SAME_DATE = {'0'}&amp;gt;} aggr (ACTIVITY_END-ACTIVITY_START,ACTIVITY_START,ACTIVITY_END))&lt;/P&gt;&lt;P&gt;+ sum (aggr (frac (EXTRA_TIME_CURRENT_DATE),ACTIVITY_START,ACTIVITY_END))&lt;/P&gt;&lt;P&gt;+ above (sum(aggr(frac(EXTRA_TIME_NEXT_DATE),ACTIVITY_START,ACTIVITY_END))),ASSET_NR_LINKED,[ACTIVITY_START.autoCalendar.Date]))&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screenshot.3.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/199265_screenshot.3.jpg" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 12:08:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-average-over-all-dimensions-instead-of-only-dimensions/m-p/17618#M1186</guid>
      <dc:creator>pascaldijkshoor</dc:creator>
      <dc:date>2018-04-11T12:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average over all dimensions instead of only dimensions with values</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-average-over-all-dimensions-instead-of-only-dimensions/m-p/17619#M1187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may be best dealt with in the load script, if appropriate.&lt;/P&gt;&lt;P&gt;You can utilise the NullAsValue statement to set the null values to 0 for the necessary fields.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/NullAsValue.htm"&gt;this link&lt;/A&gt;‌ for further details about the NullAsValue statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 01:38:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-average-over-all-dimensions-instead-of-only-dimensions/m-p/17619#M1187</guid>
      <dc:creator>rachel_delany</dc:creator>
      <dc:date>2018-04-16T01:38:04Z</dc:date>
    </item>
  </channel>
</rss>

