Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
anatle1234
Contributor III
Contributor III

Total SUM calculation for multiple expression under one dimension

hi,

I am trying to add total column to this pivot  table:

as you can see in the total column I have # customer=3 although it should be 5, since we have 2 in first column and another 3 in last column. so can someone advise me how to calculate the total sum?

I currently checked the 'show partial sums' under PTD dimension.

and also is it possible to give the user option to sort based on all the expression he wants by clicking on it (like #cusomers, #of sites, etc...)?

I am new to QV...

THANKS.

3 Replies
settu_periasamy
Master III
Master III

Can you provide your expression?

may be try with aggregation.  Like

sum(aggr(your current expression),your current dimesnsions))

sunny_talwar

uacg0009
Partner - Specialist
Partner - Specialist

Hi Anat,

If you can give some example data, it will be better.

For now, I think the reason you can 3 in total is you use the count(distinct customer).

And for the first PTD, maybe you have customer A and B.

And for the second PTD, you have customer A and B and C.

So the total will be 3, because you only have A and B and C. I think that's reasonable.

And if you want to change it to 5. I think you can use count(customer). But you need to make sure that you won't have redundant data in your source table.

Thanks.

Aiolos