8 Replies Latest reply: Sep 9, 2015 12:29 PM by Michael Tarallo

# Pivot Table partial sum problem

Hi Every body,

Kindly be informed that I have created the report in pivot table it has three expression (Sum(Sales),Sum(SalesPlan),Sum(Sales)-Sum(SalsPlan)/Sum(SalesPlan)). I ticked partial sum for pivor table. but unfortunatly the partoal sum for third expression dose not work correctly. please see the attached file. would you please help me?

Best Regards,

Sara

• ###### Re: Pivot Table partial sum problem

Division comes before subtraction so try like this:

(Sum(Sales)-Sum(SalsPlan))/Sum (SalesPlan)

• ###### Re: Pivot Table partial sum problem

Hi,

Try (Sum(Sales),Sum(SalesPlan),(Sum(Sales)-Sum(SalsPlan))/Sum(SalesPlan))

• ###### Re: Pivot Table partial sum problem

Hi,

In the presentation tab click on Subtotals on top or bottom as shown,

• ###### Re: Pivot Table partial sum problem

In addition to the suggestions above, you may want to achieve a sum of rows calculation, To do this in a pivot table:

Sum(Aggr((Sum(Sales)-Sum(SalesPlan))/Sum (SalesPlan), <chart-or-table-dimensions>))

Where <chart-or-table-dimensions> is a comma-separated list of the dimensions in your chart or table. For example

Sum(Aggr((Sum(Sales)-Sum(SalesPlan))/Sum (SalesPlan), FinishedGoods, Year, MonthName))

This is because the partial sum performs the expression on the total amounts, and "the sum of the ratios is not the same as the ratio of the sums"

• ###### Re: Pivot Table partial sum problem

Hi,

Thanks a lot. your solution works and my problem is solve.

• ###### Re: Pivot Table partial sum problem

Hi Sara,

Regards,

Mike Tarallo

Qlik

• ###### Re: Pivot Table partial sum problem

Hi Mike ,

for your kind information the solution was correct

• ###### Re: Pivot Table partial sum problem

Hi Sara - just to be clear - I am asking you to mark which reply in this thread, was correct in regards to the solution you used for your original issue.

You can see an example here: Qlik Sense Community Forum Tour - Welcome - YouTube - Mark Correct / Helpful

Regards,

Mike T

Qlik