<?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 Average on Pivot Table - Including columns with no value in average calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-on-Pivot-Table-Including-columns-with-no-value-in/m-p/2002918#M1221443</link>
    <description>&lt;P&gt;I have a pivot table with an average at the end using the &lt;SPAN&gt;Secondarydimensionality() function&amp;nbsp;(thank you &lt;A id="link_24" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593" target="_self" aria-label="View Profile of rubenmarin" aria-describedby="userProfileCard-22593"&gt;&lt;SPAN class="login-bold"&gt;Rubenmarin&lt;/SPAN&gt;&lt;/A&gt;) however I am having issues with the way it is calculated. Ruben did provide another expression which did a division by 12 but this will not work for the current year&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;At the moment the expression is only calculating by the months which have a value e.g. Supplier A -&amp;nbsp; (2+1+3+1+1) / 5 = 1.6 but it should be&amp;nbsp;(2+1+3+1+1) / 11 = 0.7&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikMo_0-1668072861770.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93375i0E9CA43DDEBD58B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="QlikMo_0-1668072861770.png" alt="QlikMo_0-1668072861770.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However when the Year selection is a previous year it should be divided by 12 so A average should be 0.6&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikMo_1-1668073049501.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93376i206F70D4166775FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="QlikMo_1-1668073049501.png" alt="QlikMo_1-1668073049501.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I just can't figure out how to do this without doing the average calculation in the script, which I don't want to do as I need the data to be linked to other fields so users can make selections.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated, qvd attached.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2022 09:50:22 GMT</pubDate>
    <dc:creator>QlikMo</dc:creator>
    <dc:date>2022-11-10T09:50:22Z</dc:date>
    <item>
      <title>Average on Pivot Table - Including columns with no value in average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-Pivot-Table-Including-columns-with-no-value-in/m-p/2002918#M1221443</link>
      <description>&lt;P&gt;I have a pivot table with an average at the end using the &lt;SPAN&gt;Secondarydimensionality() function&amp;nbsp;(thank you &lt;A id="link_24" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593" target="_self" aria-label="View Profile of rubenmarin" aria-describedby="userProfileCard-22593"&gt;&lt;SPAN class="login-bold"&gt;Rubenmarin&lt;/SPAN&gt;&lt;/A&gt;) however I am having issues with the way it is calculated. Ruben did provide another expression which did a division by 12 but this will not work for the current year&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;At the moment the expression is only calculating by the months which have a value e.g. Supplier A -&amp;nbsp; (2+1+3+1+1) / 5 = 1.6 but it should be&amp;nbsp;(2+1+3+1+1) / 11 = 0.7&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikMo_0-1668072861770.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93375i0E9CA43DDEBD58B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="QlikMo_0-1668072861770.png" alt="QlikMo_0-1668072861770.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However when the Year selection is a previous year it should be divided by 12 so A average should be 0.6&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikMo_1-1668073049501.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93376i206F70D4166775FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="QlikMo_1-1668073049501.png" alt="QlikMo_1-1668073049501.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I just can't figure out how to do this without doing the average calculation in the script, which I don't want to do as I need the data to be linked to other fields so users can make selections.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated, qvd attached.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 09:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-Pivot-Table-Including-columns-with-no-value-in/m-p/2002918#M1221443</guid>
      <dc:creator>QlikMo</dc:creator>
      <dc:date>2022-11-10T09:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Average on Pivot Table - Including columns with no value in average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-Pivot-Table-Including-columns-with-no-value-in/m-p/2002948#M1221446</link>
      <description>&lt;P&gt;Hi, you can try with:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;If(SecondaryDimensionality()=0
  ,Num(sum(aggr(sum(Counter), Supplier, Month))/Count(DISTINCT TOTAL Year&amp;amp;Month),'0.0')
  ,sum(Counter)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 10:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-Pivot-Table-Including-columns-with-no-value-in/m-p/2002948#M1221446</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-11-10T10:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average on Pivot Table - Including columns with no value in average calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Average-on-Pivot-Table-Including-columns-with-no-value-in/m-p/2003027#M1221449</link>
      <description>&lt;P&gt;Thank you so much, I understand now&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 12:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-on-Pivot-Table-Including-columns-with-no-value-in/m-p/2003027#M1221449</guid>
      <dc:creator>QlikMo</dc:creator>
      <dc:date>2022-11-10T12:23:59Z</dc:date>
    </item>
  </channel>
</rss>

