Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

anavin33
New Contributor II

Pivot table total column not correct

I have a pivot table that has 4 dimensions and I am showing partial sums on all the column. I can see the totals per column on the bottom and then i also have a total at the far right. The total at the far right does not equal the sum of all the column totals.

I have pulled one dimension to the top, so it is breaking the columns up into the dimensions. I am attaching a picture of what the columns look like and the total.

This is also happening on a less complex pivot table. See second attachment qlikview2. I am using distinct in my expressions in both charts could this be a factor?

3 Replies
YoussefBelloum
Esteemed Contributor

Re: Pivot table total column not correct

Hi,

try this first on the least complex pivot table:

example you have Sum of something: sum(Field)

now add the red part outside the sum:

Sum(Aggr( Sum(Field), ALL_THE_DIMENSIONS_USED_ON_THE_TABLE))


Sum(Aggr( Sum(Field), Dimension1,Dimension2,..))


anavin33
New Contributor II

Re: Pivot table total column not correct

what if the dimensions are all calculated dimensions? Do I just put the field I am calculating on?

YoussefBelloum
Esteemed Contributor

Re: Pivot table total column not correct

Yes, give it a try and tell me

Community Browser