<?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 Pivot issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334092#M123197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an issue with a pivot I just did (Im a newbie at qlikview)&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="17722" class="jive-image-thumbnail jive-image" onclick="" alt="Skærmbillede 2012-07-04 kl. 14.38.34.png" src="/legacyfs/online/17722_Skærmbillede 2012-07-04 kl. 14.38.34.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I just did this pivot that shows the subscription renewal count for each of our products. Now at the end (next to 13) I want to add the average count for each product and maybe also the average customer lifetime value(it should be average count * product price).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But How do I add that at the end of the pivot?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2012 12:47:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-04T12:47:14Z</dc:date>
    <item>
      <title>Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334092#M123197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an issue with a pivot I just did (Im a newbie at qlikview)&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="17722" class="jive-image-thumbnail jive-image" onclick="" alt="Skærmbillede 2012-07-04 kl. 14.38.34.png" src="/legacyfs/online/17722_Skærmbillede 2012-07-04 kl. 14.38.34.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I just did this pivot that shows the subscription renewal count for each of our products. Now at the end (next to 13) I want to add the average count for each product and maybe also the average customer lifetime value(it should be average count * product price).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But How do I add that at the end of the pivot?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 12:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334092#M123197</guid>
      <dc:creator />
      <dc:date>2012-07-04T12:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334093#M123198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can enable a partial sum for you second dimension in presentation tab of your chart properties, the use as expression something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=if(SecondaryDimensionality()=0,avg(aggr( count(FIELD),product_id,c)),count(FIELD))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. use secondarydimensionalty() function to check if your in a cell or the total column, then use an appropriate expression (in my example, you need to replace the aggr() dimensions with your chart dimensions and FIELD with the field you are counting on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 12:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334093#M123198</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-04T12:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334094#M123199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont understand what I need to replace "aggr()" with?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="border-collapse: collapse; font-family: arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 13:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334094#M123199</guid>
      <dc:creator />
      <dc:date>2012-07-04T13:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334095#M123200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, you probably need the advanced aggregation (to average the counts per your second dimension).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I intened to say that you need to reuse your pivot table chart dimensions (product_id and c ?) also as dimensions in your aggr() function. So if your field names you are using as dimension in the pivot table &lt;EM&gt;are &lt;/EM&gt;product_id and c, you don't need to change the aggr() dimensions. Just replace count(FIELD) with the expression you are using to calculate the counts. in your table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 13:37:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334095#M123200</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-04T13:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334096#M123201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I Tried to add "&lt;EM style="font-size: 12px;"&gt;=if(SecondaryDimensionality()=0,avg(aggr( count(count),product_id,c)),count(count)) in the "Label for Totals" under partial sums, but nothing really happened - it still showing the total numbers.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;(Count is the name of the field)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 09:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334096#M123201</guid>
      <dc:creator />
      <dc:date>2012-07-05T09:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334097#M123202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you are currently using one expression (defined in expression tab) to calculate your cell values in your pivot table.&lt;/P&gt;&lt;P&gt;As I understood, this expression is &lt;/P&gt;&lt;P&gt;&lt;EM&gt;=count(count)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace this expression by&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;=if(SecondaryDimensionality()=0,avg(aggr( count(count),product_id,c)),count(count))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And don't forget to enable the partial sum for your second dimension.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The secondarydimensionality() is used for dimensions dragged to the top (as in your sample image). Use dimensionality() if you are using vertical dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 09:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334097#M123202</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-05T09:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334098#M123203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ohh Thank you! - I tried to change the expression, but the only thing which happened were that totals columns disappeared&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="17759" class="jive-image-thumbnail jive-image" onclick="" alt="Skærmbillede 2012-07-05 kl. 11.42.16.png" src="/legacyfs/online/17759_Skærmbillede 2012-07-05 kl. 11.42.16.png" width="450" /&gt;&lt;IMG __jive_id="17760" class="jive-image-thumbnail jive-image" onclick="" alt="Skærmbillede 2012-07-05 kl. 11.42.33.png" src="/legacyfs/online/17760_Skærmbillede 2012-07-05 kl. 11.42.33.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 09:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334098#M123203</guid>
      <dc:creator />
      <dc:date>2012-07-05T09:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334099#M123204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so your second dimension is not called 'c' but 'count', right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check my above posts and correct the second dimension in the aggr() function from 'c' to 'count':&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;=if(SecondaryDimensionality()=0,avg(aggr( count(count),product_id,&lt;STRONG&gt;count&lt;/STRONG&gt;)),count(count))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 09:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334099#M123204</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-05T09:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334100#M123205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it to work - Thank you swuehl!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I noticed it calculates the wrong average:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="17761" class="jive-image-thumbnail jive-image" onclick="" alt="Skærmbillede 2012-07-05 kl. 12.09.40.png" src="/legacyfs/online/17761_Skærmbillede 2012-07-05 kl. 12.09.40.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I dont really understand how to change it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to calculate is that average subscription count for a product_id:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For product_id 23 it should calculate:&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;=((2954*1)+(2342*2)+(1924*3)+(1578*4)+(1368*5)+(1155*6)+(992*7)+(829*8)+(718*9)+(643*10)+(531*11)+(360*12)+(53*13))&amp;nbsp; / (2954+2342+1924+1578+1368+1155+992+829+718+643+531+360+53)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Average count = 4,6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 10:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334100#M123205</guid>
      <dc:creator />
      <dc:date>2012-07-05T10:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334101#M123206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;=if(SecondaryDimensionality()=0,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;sum(aggr( count*count(count),product_id,count)) / sum( aggr( count(count), product_id,count)),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;count(count))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[And please try to format your total results in number tab, currently it's quite hard to check if the results are ok.]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 11:09:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334101#M123206</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-05T11:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334102#M123207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Swuehl - you are my hero!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to format the numbers, but the average count and the standard count should be formated differently, so it's hard to get right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="17765" class="jive-image-thumbnail jive-image" onclick="" alt="Skærmbillede 2012-07-05 kl. 14.44.27.png" src="/legacyfs/online/17765_Skærmbillede 2012-07-05 kl. 14.44.27.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 12:49:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334102#M123207</guid>
      <dc:creator />
      <dc:date>2012-07-05T12:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334103#M123208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the number format tab, try using the num() function around your calculation expressions (setting the number tab format to 'expression default'):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;=if(SecondaryDimensionality()=0,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;&lt;STRONG&gt;num&lt;/STRONG&gt;(sum(aggr( count*count(count),product_id,count)) / sum( aggr( count(count), product_id,count)),&lt;STRONG&gt;'###.00'),&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;count(count))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px;"&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 12:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334103#M123208</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-05T12:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot issue</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334104#M123209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't I just add you to Skype - that would SO great &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank's for your help - I would have never figured this out by myself... Now I just need to figure out what the expression means, so actully will learn something &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 13:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-issue/m-p/334104#M123209</guid>
      <dc:creator />
      <dc:date>2012-07-05T13:07:31Z</dc:date>
    </item>
  </channel>
</rss>

