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

how to get totals for the rows and columns

i have to get totals on the bottom of the table showing totals for the columns and

totals on the right side which shows the totals of the columns

i am using a pivot table

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I'm going offline in a minute, so the last reply for today: take the whole sum in ():

(sum(Q) +

sum([Amount in]) +

sum({<[ Account ]={'*2001*','*3072*','*3023*','*3034*', '*3004*'}>} [Amount]) ) /   sum(quantity)

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Try using "Show Partial Sums"  (presentation tab) for different dimensions.  Two of them are the ones you need.  Sorry, I cannot guess which exactly 🙂

Regards,

Michael

Not applicable
Author

by using partial sum I am getting the sums for the rows

now i need sum's for the columns

Anonymous
Not applicable
Author

The sum for the columns in pivot table exisits only if you have a dimension on top.  If all dimnsions are on the left, there is no sum for coulmns.  Unless you create it artificially by adding an expression which is the sum of all other expressions...

Regards,

Michael

Not applicable
Author

ok help me in getting the sum like i am having now 4 expr

sum(Q)+

sum([Amount in])+

sum({<[ Account ]={'*2001*','*3072*','*3023*','*3034*'}>} [Amount])+

sum({<[ Account ]={'*3004*'}>} [Amount ])

how to write a expression for this one now

Anonymous
Not applicable
Author

Well, you just did it already 🙂

You can simplify it a little because the 3rd and 4th are the same with different conditions.  So:

sum(Q) +

sum([Amount in]) +

sum({<[ Account ]={'*2001*','*3072*','*3023*','*3034*', '*3004*'}>} [Amount])

Not applicable
Author

ok

now this total should be divided by sum(quantity)

sum(Q) +

sum([Amount in]) +

sum({<[ Account ]={'*2001*','*3072*','*3023*','*3034*', '*3004*'}>} [Amount])  /   sum(quantity)

it is not working.......................

Anonymous
Not applicable
Author

I'm going offline in a minute, so the last reply for today: take the whole sum in ():

(sum(Q) +

sum([Amount in]) +

sum({<[ Account ]={'*2001*','*3072*','*3023*','*3034*', '*3004*'}>} [Amount]) ) /   sum(quantity)