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

Doubt the development of graphics.

I have a table with Product Code and Quantity. This table shows a value of 10 pieces! When I'm creating a chart also by Product Code and make the sum of the quantity, has a double! I have no option of accumulation value or something! Would anyone say why this is happening? Thank you!

9 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Is it a pivot table? Accumulation is only possible with straight table and some chart types - if I remember correctly.

Not applicable
Author

Hi,

Is a pivot table. The problem is that even sum the result, it should be like to the result of simple table. And the result is duplicate ...

Not applicable
Author

That doesn't sound right. Could you post a sample?

Are you using Sum(Quanitity) in your straight table expression or just Quantity? If you're using just Quantity on your straight table with the correct results and getting double the Quantity when using Sum(Quantity) in the pivot, then I'm guessing you have duplicated data in your app. Try using Sum(Quantity) in your straight table.

Not applicable
Author

Example overleaf ...

Note that in my summary table are 7 pieces. In the graphic, the sum equals 18.
It is more than double ...
Not applicable
Author

in your first table are you displaying the information from all your fields? Try to add all your fields and see what pops up.

Not applicable
Author

See who has the same error ..!
It doubles the amount ...

Not applicable
Author

What I meant is to add all your fields to the table to the left, because I suspect there's a field you're not seeing and considering in your sum in your chart to the right.

Not applicable
Author

Did you try setting your expression to Sum(Quantidade) on the straight table? I suspect this is a data issue. When you use Quantidade as your expression on a straight table, you're getting the equivilent of First(Quantidade).

I think dragonauta may be on to something. You could have multiple records that have the same No NF and Cod. Officer, so in your straight table, they show as one record (when using Quantidade). In your pivot you are summing them, so each record is summed. The way your straight table is set up, only one is counted.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

My guess is that your data is duplicated for some reason. Look into your load script - do you have any join statements? If you do, run your script and notice the number of loaded records before the join and after the join. I bet it's doubling somewhere.

Another possibility is if you have 2 dimensions from two different tables, and the tables are not linked properly (either a missing link, or a "many-to-many" link). In this case, matching all possible pairs can cause the duplication of the results.

cheers!