Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Totaling wrong in a pivot table?

Does anyone know what might cause the issue I'm having with the total?  How would I make the table sum of rows when you drill down?  I'm referencing the attached png.

7 Replies
erichshiino
Partner - Master
Partner - Master

Hi, Brandon

Can you post here your expressions and maybe some data sample? Your data model might be resulting in this Pivot table total

Regards,

Erich

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi Brandon,

do you have any synthetic keys in your data model?

Greetings from Munich

Martina

Not applicable
Author

Here is the expression for the column that is off:

if(column(1)<>0,1,0)*sum(IMYUNS*IPMLOT*IPMLGT*IPMWGT/1000)

Not applicable
Author

No Munich, no synthetic keys.

Not applicable
Author

I think the expression kind of answers the problems which is why I wanted to know if there is a way to sum rows in a pivot table?

edg_baltazar
Partner - Creator
Partner - Creator

Hello brandon , the think is that in pivot tables you can't choose the total mode like in the straight table where you can choose between different total modes, in pivot table the total mode is the Expresion Total, if you want to make a sum of rows you need to use aggr function in the qlikview reference manual there is a simple example of this, regards!

edg_baltazar
Partner - Creator
Partner - Creator

The problem is that in your expression you have one if statement so row by row its ok , but when calculates the total of that expression it calculates if column(1) <> 0 for total , is not going to make the comparision row by row and the sum it like you spect , like i said you need to use aggr function in your expression. Regards