Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculation of Subtotals

Hi All, 

I would like to calculate 2 subtotals as given in screen shot. The formula which we have used is

 

=if(Dimensionality() = 2 ,
if (Order =1,
Sum({$<Order={1}>} (HSL)/1000*(-1)),
if (Order =2,
Sum({$<Order={2}>} (HSL)/1000*(-1)) + Sum({$<Order={1}>} (HSL)/1000*(-1))
))
,(
Sum(HSL)/1000)*(-1)
)

HSL is amount field

1qlikview.jpg

Please let us know where we have to make changes, your help will be appreciated.

Regards

LSD

1 Reply
Not applicable
Author

Goto presentations tab in your pivot table, select the column by which you need the subtotals by. Select "Show Partial Sums" check box.

You need not use a script to achieve this