3 Replies Latest reply: Jun 12, 2013 4:08 AM by Jan Vesely

# Partial sum in pivot table

Hi everyone,

I have a small issue (perfectly understandable though) in QV with parital sums in my pivot table (see screenshot below).

The number in the last column (# of tags) is based on an expression. The expression counts unique codes using simple count(fieldName). All good so far.

However, some of the codes have been detected on multiple days - this causes the partialSum to be indeed a count of unique codes but not a sum of the numbers above it. Because it is an expression, I cannot define accumulation / total mode. I also cannot switch to "calculated dimension", as count(fieldName) delivers //calculation error when used as dimension.

How can I solve this? Is there a way to solve this?

Thanks in advance!

• ###### Re: Partial sum in pivot table

You can probably do this using the dimensionality() function in an if statement.

Please read this document: Preparing examples for Upload - Reduction and Data Scrambling and upload a sample document.

• ###### Re: Partial sum in pivot table

Hi Gysbert,

Thanks again for your answer ... so it might be dimensionality - versatile function! Ok, I will give it a try tomorrow.

By the way - is there somewhere a document that describes why one expression will not work for "calculated dimensions" but it does work for expressions? And why is it not possible to define totals / accumulation rules for expressions? I think a lot of ppl run into this ... I mean, I have quite a simple use case and this is already the second time I'm having issues with partial sums.

Anyway, thank you,

Jan

• ###### Re: Partial sum in pivot table

Ok, in case anyone else runs into this, the solution is is not really dimensionality although you may use it - it will just not do anything.

The actual solution is this:

http://community.qlik.com/message/189352#189352

..that is just one example, there are many other posts of ppl who run into issues with (partial) sums in pivot tables.

I might have done a lousy job explaining what was wrong, for that I apologize.

Thanks,

Jan