Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Subtotals

Hello,

I was wondering if I could get some help with QlikView please.

I have a pivot table with numerous products and sales data. I would like to add a subtotal at the end of each product as well as a grand total.

Please see example below.

Current data

Product NameAmount soldSales
Product 1512000
Product 1211000
Product 2341500
Product 212500
Product 210450
Grand total1285450

Desired result

Product NameAmount soldSales
Product 1512000
Product 1211000
Product 1 total723000
Product 2341500
Product 212500
Product 210450
Product Total562450
Grand Total905450

Many thanks,

Esther

2 Replies
Anil_Babu_Samineni

May be try something like below?

Main:

LOAD *, RowNo() as ID Inline [

Product Name, Amount sold, Sales

Product 1, 51, 2000

Product 1, 21, 1000

Product 2, 34, 1500

Product 2, 12, 500

Product 2, 10, 450

];

Concatenate (Main)

LOAD RowNo() as ID,'Product 1 Total' as [Product Name], Sum([Amount sold]) as [Amount sold], Sum(Sales) as Sales Resident Main Where

[Product Name] = 'Product 1' Order By [Product Name];

Concatenate (Main)

LOAD RowNo() as ID,'Product 2 Total' as [Product Name], Sum([Amount sold]) as [Amount sold], Sum(Sales) as Sales Resident Main Where

[Product Name] = 'Product 2' Group By [Product Name] Order By [Product Name];

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
devarasu07
Master II
Master II

Hi,

What is use of this report format? by default if we do sum(Sales)  of product then it will group by values so u can't get desired output. try to do qlikview by default partial sum option (best way)

if you wish to see without group by value then use that table object with back end script  instead of stright/pivot table method.

Capture.JPG