<?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 as subtotal in pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472595#M487016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found the Solution for me and here this will help you :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its Simple&lt;/P&gt;&lt;P&gt;Just right down the&amp;nbsp; &lt;SPAN style="color: #000000; font-size: 10pt;"&gt;"% Grønne"&amp;nbsp; expression as :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;=Aggr(Aggr(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (1) / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(2) ,Region,Month))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I hope this will work&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Aug 2013 10:49:08 GMT</pubDate>
    <dc:creator>qlikpahadi07</dc:creator>
    <dc:date>2013-08-21T10:49:08Z</dc:date>
    <item>
      <title>Average as subtotal in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472593#M487014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached you can see a pivot-table made in QlikView 11.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table has 2 dimensions and 3 expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension 1: &lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;amp;'-'&amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MONTHSTART&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MAKEDATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.YEAR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.MONTH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,1)), 'MM') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Dimension 2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;%SM9.CASES.REGION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Expression1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES.TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'QUOTE'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES.OCMQM1.LEVERANSE_TILBUD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LEVERANSEKOORDINERING'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.RUB_DELIVERY_STATUS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Grønn'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.RUB_DELIVERY_STATUS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES.TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'QUOTE'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES.OCMQM1.LEVERANSE_TILBUD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LEVERANSEKOORDINERING'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.RUB_DELIVERY_STATUS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Grå'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%SM9.CASES.OPEN_TIME&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'=((NUM(FLOOR(makedate(SM9.CASES_MONTHLY_HISTORY.YEAR,SM9.CASES_MONTHLY_HISTORY.MONTH,1))) - NUM(FLOOR(%SM9.CASES.OPEN_TIME))) &amp;lt; 3)'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.RUB_DELIVERY_STATUS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Expression 2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES.TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'QUOTE'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES.OCMQM1.LEVERANSE_TILBUD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LEVERANSEKOORDINERING'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SM9.CASES_MONTHLY_HISTORY.RUB_DELIVERY_STATUS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Expression 3:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (1) / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(2) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;At the moment the pivot table only includes data for 1 month, but the number of months will increase up to 12 months.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;My problem is that I want the the total for expression "% Grønne" to show a subtotal as an average for each month.&amp;nbsp; The average for each month shall be calculated as "%Grønne" for each Regions divided by number of regions .&amp;nbsp; For the current month: (96,7% + 92,3% + 97,6% + 85,0% + 84,8%) / number of regions = &lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;91,3%&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;I guess the solution is an expression with use of aggr-funtion, but I am not able to fix this expression on my own.&amp;nbsp; How can I for each month show an average for the month based on the %Grønne for each Region?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;The table does not need to show the result for each region.&amp;nbsp; Users do only need to see the month and the average for the month based on all Regions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;I hope anyone can help me with a solution.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Torunn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 15:41:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472593#M487014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-26T15:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Average as subtotal in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472594#M487015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even I am facing the same problem I can User Straight Table and force it to Avg but have no clue in PIVOT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:22:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472594#M487015</guid>
      <dc:creator />
      <dc:date>2013-08-21T10:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Average as subtotal in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472595#M487016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found the Solution for me and here this will help you :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;its Simple&lt;/P&gt;&lt;P&gt;Just right down the&amp;nbsp; &lt;SPAN style="color: #000000; font-size: 10pt;"&gt;"% Grønne"&amp;nbsp; expression as :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;=Aggr(Aggr(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (1) / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(2) ,Region,Month))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I hope this will work&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472595#M487016</guid>
      <dc:creator>qlikpahadi07</dc:creator>
      <dc:date>2013-08-21T10:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Average as subtotal in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472596#M487017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will have to use dimensionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if attached QVW helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have to change the expression to "dimensionality()=1" as you have one more dimension than in my eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-as-subtotal-in-pivot-table/m-p/472596#M487017</guid>
      <dc:creator>abeyphilip</dc:creator>
      <dc:date>2013-08-21T10:50:39Z</dc:date>
    </item>
  </channel>
</rss>

