<?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: Sales - Sum of Quantity based on ParentName and ChildName in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760413#M270552</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a pivot table with&lt;/P&gt;&lt;P&gt;Dimensions ParentName and ChildName&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;Expression Sum(Qty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select partial sums and total sums.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Jan 2015 10:43:10 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2015-01-25T10:43:10Z</dc:date>
    <item>
      <title>Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760412#M270551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to evaluate parent and child total quantity with sum of both like required output is given below, but facing an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales.qvw and Sales.xlsx is attached with this thread, please find attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Required output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 407px;"&gt;&lt;TBODY&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15.0pt; width: 167pt;" width="222"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;ParentName&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 70pt;" width="93"&gt;&lt;STRONG style="font-size: 8pt;"&gt;ChildName&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 22pt;" width="29"&gt;&lt;STRONG style="font-size: 8pt;"&gt;Qty&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 47pt;" width="63"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;Total Qty&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl65" height="20" style="height: 15.0pt; border-top: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;NI-R6501-Gadsden35-MF-006-Set3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;13&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl64" height="20" style="height: 15.0pt; border-top: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;NI-gadsden35&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;15&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl64" height="20" style="height: 15.0pt; border-top: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;NI-MF-006&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;20&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl64" height="20" style="height: 15.0pt; border-top: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;NI-R6501-ZZ8&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;17&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl66" height="20" style="height: 15.0pt; border-top: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;NI-R6501&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;STRONG style="font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl64" height="20" style="height: 15.0pt; border-top: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;NI-R6501-ZZ8&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15.0pt;"&gt;&lt;TD class="xl64" height="20" style="height: 15.0pt; border-top: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;NI-MF-006&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expressions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;ParentName Total Qty = Child1 + Child2 + Child3&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;ChildName1 Total Qty = ParentName Total Qty + Child1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;ChildName2 Total Qty = ParentName Total Qty + Child2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;ChildName3 Total Qty = ParentName Total Qty + Child3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;Please share me script and expressions, I'm using QlikView Personal Edition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ishfaque Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 10:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760412#M270551</guid>
      <dc:creator>engishfaque</dc:creator>
      <dc:date>2015-01-25T10:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760413#M270552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a pivot table with&lt;/P&gt;&lt;P&gt;Dimensions ParentName and ChildName&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;Expression Sum(Qty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select partial sums and total sums.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 10:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760413#M270552</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-01-25T10:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760414#M270553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I get this output: can it be ok for you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/76141_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I changed your script as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NULLASVALUE ChildName, Qty;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Product:&lt;/P&gt;&lt;P&gt;LOAD ParentName,&amp;nbsp;&amp;nbsp; ChildName,&amp;nbsp;&amp;nbsp;&amp;nbsp; Qty&lt;/P&gt;&lt;P&gt;FROM Sales.xlsx (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;load ParentName, null() as&amp;nbsp; ChildName, null() as&amp;nbsp;&amp;nbsp;&amp;nbsp; Qty&lt;/P&gt;&lt;P&gt;FROM Sales.xlsx (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD ParentName, Sum(Qty) as Total Resident Product Group By ParentName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and expressions of pivot table are:&lt;/P&gt;&lt;P&gt;-Qty: just the field Qty&lt;/P&gt;&lt;P&gt;-Total Qty: if(IsNull(ChildName), sum(TOTAL &amp;lt;ChildName&amp;gt; Qty),sum(Qty)+ sum({1}total &amp;lt;ParentName&amp;gt; Qty))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, check carefully if selections of your application work well: for example I insert {1} in the last sum because if you click on a specific ChildName yuo can mantain the same row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know!&lt;/P&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 10:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760414#M270553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-25T10:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760415#M270554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Elena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still issue is coming, when I'm going to select any one parent then It's showing both parents in a pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not selected parent should not display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind find attached screenshot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Others.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/76202_Others.png" style="height: 267px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ishfaque Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 11:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760415#M270554</guid>
      <dc:creator>engishfaque</dc:creator>
      <dc:date>2015-01-25T11:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760416#M270555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this one expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(IsNull(ChildName), sum(TOTAL &amp;lt;ChildName&amp;gt; Qty),sum(Qty)+ sum({1&amp;lt;&lt;STRONG&gt;ParentName=p(ParentName)&lt;/STRONG&gt;&amp;gt;}total &amp;lt;ParentName&amp;gt; Qty))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 11:20:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760416#M270555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-25T11:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760417#M270556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Elena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible to explain you expression here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ishfaque Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 11:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760417#M270556</guid>
      <dc:creator>engishfaque</dc:creator>
      <dc:date>2015-01-25T11:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760418#M270557</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;Try:&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;ParentChild:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ParentName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ChildName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Qty&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;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;C&gt;&lt;BR /&gt; (&lt;/C&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ParentName&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;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Qty&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SumQty&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;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ParentChild&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ParentName&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;Expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Qty&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)+ &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SumQty&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="font-size: 8pt;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Neetha&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 11:40:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760418#M270557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-25T11:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sales - Sum of Quantity based on ParentName and ChildName</title>
      <link>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760419#M270558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't it work again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I divided the simple sum into two parts, one for parent, in order to get to total row, and one for child, in order to consider your logic (suce as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;ChildName1 Total Qty = ParentName Total Qty + Child1).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;To do this, I had to have a fictive child, added in script, displayed as the first child (tab Sort)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;So, if the child is the fictive one (null value, first row), simply sum Qty disregarding Child (but maybe you can eliminate &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TOTAL &amp;lt;ChildName&amp;gt;, because it seems work even without it), and this one gives you the total.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If Child is not the fictive one, so it's one of yours, you have to sum qty of this child (sum(qty)) and of its parent that is the second part of the expression. I use {1} beacuse without it, formula didn't work if you selected a child, but in this way (as you appointed) expression didn't take in account any selection. So, if you want that every selection changes the result, you have to force {1} adding p() function for evrey fields you want: for these field {1} is not applied.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I dont' know if it's clear...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jan 2015 12:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sales-Sum-of-Quantity-based-on-ParentName-and-ChildName/m-p/760419#M270558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-25T12:08:52Z</dc:date>
    </item>
  </channel>
</rss>

