Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

DIfference between data in plain table and Pivot Table

Hi everybody !

I have a huge dataset, which I'm using for data presentation in various charts and tables.

Everything looks like working OK, but I noticed some small differences in data.

I filtered data in QV to the lovest level until I could localize the difference between expected data and data in QV.


I have a plain table with source data and the sum in rightmost column is correct (54 978 EUR).

I have a pivot table from the same data and sum is incorrect (51 111 EUR).

Both tables represent data from the same filtered dataset.

Snap_2014.10.14 17.14.14_004.jpg

But when I remove the column "nazevob" from the plain table, it returns reduced number of rows and the sum equals the sum value in the pivot table:

Snap_2014.10.14 17.15.30_005.jpg

How can I change the pivot table for getting correct data ?


Thanx in advance.


Duski.


13 Replies
vgutkovsky
Master II
Master II

So your aggr contains all dimensions now of your pivot table AND your straight table?

Not applicable
Author

Thank you Vlad.

Sorry, but I have to finish for today, because my baterry is nearly drained.:-(

But I think I'm on the way to understand what happens in the aggr statement.

Good night for today and thank you.

Duski

Not applicable
Author

Good morning, Vlad 🙂

Update: solved in this threat Table / Pivot table sum

One more question for helping me to better understanding how aggr works.

My motive is to find the simplest solution for maintenance my charts and pivot tables in the future.

Your suggestion to include ALL (26) fields into the aggr statement is probably correct, but it seems to me very uncomfortable for maintenance in future 😞

In one of my charts I have a calculated expression:

sum({$<Séria ={'08. Účtovníctvo'}>}Čiastka)

The goal is to sum all records from my dataset, where Séria="08. Účtovníctvo" following the current selection.

This works (with small issues with data, which we solved yesterday :-)) and it returns data even if Séria='08. Účtovníctvo' is not actually selected. This is the behaviour I want.

But when I extend the expression with aggr (to repair data, according to your yesterday help), it looks like this ...

sum(aggr(sum({$<Séria ={'01. Orientačný plán'}>}Čiastka),CISLOSTAVBY,nazevob,Kód,Obdobie,Rok,Stav,Séria))

... and it doesn't work; it returns dataONLY if Séria='08. Účtovníctvo' is actually selected. This is the behaviour I don't want. :.(

Any suggestion ?

Thanx in advance.

Duski

vgutkovsky
Master II
Master II

Please don't double-post, it makes the community harder for everyone to use. I'm sure someone in the other thread can help you with this question.

Vlad