<?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: Pivot Table totals/partial sums with If() statements in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-Table-totals-partial-sums-with-If-statements/m-p/984488#M335953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kaushik, that seems to have worked. I added an additional dimension to the Aggr() for the month after product, as these values are being compared on a monthly basis - with that implementation everything seems to be validating perfectly.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(&lt;SPAN style="color: blue; font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Product Type]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;= 'Type1', &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubType2"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;), &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubTypeX"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubTypeY"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;)&lt;BR /&gt;),[Product Type],Product, MonthYear))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Aug 2015 13:28:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-25T13:28:46Z</dc:date>
    <item>
      <title>Pivot Table totals/partial sums with If() statements</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-totals-partial-sums-with-If-statements/m-p/984486#M335951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;I've got a problem with the subtotals calculated in a pivot table; hopefully I may be able to get some help here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;The expression currently looks similar to this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="color: blue; font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB;"&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;[Product Type]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;= 'Type1', &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;"SubType2"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;), &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;"SubTypeX"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;"SubTypeY"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;BR /&gt; ) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;Now, I've changed my field names above but I'll explain. There are two product types, with Type1 products having quantities of SubType1, 2 and 3; Type2 products having quantities of SubTypeX and SubTypeY. Occasionally, and mostly due to inconsistencies in the data I'm pulling, a Type1 product may have SubTypeX or SubTypeY values. So something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;Product, Product Type, Product SubType, Quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;A, &lt;SPAN style="color: #3366ff;"&gt;Type1&lt;/SPAN&gt;, &lt;SPAN style="color: #3366ff;"&gt;SubType1&lt;/SPAN&gt;, ##&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;A, &lt;SPAN style="color: #3366ff;"&gt;Type1&lt;/SPAN&gt;, &lt;SPAN style="color: #3366ff;"&gt;SubType2&lt;SPAN style="color: #000000;"&gt;, ##&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;A, &lt;SPAN style="color: #3366ff;"&gt;Type1&lt;/SPAN&gt;, &lt;SPAN style="color: #3366ff;"&gt;SubType3&lt;/SPAN&gt;, ##&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;B, &lt;SPAN style="color: #ff0000;"&gt;Type2&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;SubTypeX&lt;/SPAN&gt;, ##&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;B, &lt;SPAN style="color: #ff0000;"&gt;Type2&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;SubTypeY&lt;/SPAN&gt;, ##&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;C, &lt;SPAN style="color: #3366ff;"&gt;Type1&lt;/SPAN&gt;, &lt;SPAN style="color: #3366ff;"&gt;SubType1&lt;/SPAN&gt;, ##&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;C, &lt;SPAN style="color: #3366ff;"&gt;Type1&lt;/SPAN&gt;, &lt;SPAN style="color: #3366ff;"&gt;SubType2&lt;/SPAN&gt;, ##&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;C, &lt;SPAN style="color: #3366ff;"&gt;Type1&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;SubTypeY&lt;/SPAN&gt;, ##&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;So what I want to do is calculate the quantity of Type1, (SubType1 + SubType2 + SubType 3) and Type2 (SubTypeX + SubTypeY); while avoiding any cases where a Type1 product may calculate as (SubType1 + SubType2 + SubTypeY).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: auto 0px;"&gt;&lt;SPAN style="mso-fareast-language: EN-GB; color: #000000; font-size: 12pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';"&gt;The expression above seems to work fine in my pivot table proper, however the partial sums appear to be calculated incorrectly - the number either matching the expected Type2 (the 'alternate' option of the If() expression), or offset by the precise amount of overlap on a single line item (eg, based on the above table, ## of C, SubTypeY)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I have a feeling the Aggr() function may be the solution, but I have not had any luck implementing it to avoid the problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 15:46:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-totals-partial-sums-with-If-statements/m-p/984486#M335951</guid>
      <dc:creator />
      <dc:date>2015-08-24T15:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table totals/partial sums with If() statements</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-totals-partial-sums-with-If-statements/m-p/984487#M335952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman', serif; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;[Product Type]&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;= 'Type1', &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;"SubType2"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;), &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;"SubTypeX"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;"SubTypeY"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: maroon;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"&gt;)&lt;BR /&gt;),[Product Type],Product))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 16:16:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-totals-partial-sums-with-If-statements/m-p/984487#M335952</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2015-08-24T16:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table totals/partial sums with If() statements</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Table-totals-partial-sums-with-If-statements/m-p/984488#M335953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kaushik, that seems to have worked. I added an additional dimension to the Aggr() for the month after product, as these values are being compared on a monthly basis - with that implementation everything seems to be validating perfectly.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(&lt;SPAN style="color: blue; font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Product Type]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;= 'Type1', &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubType2"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubType1"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;), &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Product SubType]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubTypeX"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;"SubTypeY"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;[Quantity]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;)&lt;BR /&gt;),[Product Type],Product, MonthYear))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:28:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Table-totals-partial-sums-with-If-statements/m-p/984488#M335953</guid>
      <dc:creator />
      <dc:date>2015-08-25T13:28:46Z</dc:date>
    </item>
  </channel>
</rss>

