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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
yuech1
Contributor
Contributor

Expression

yuech1_0-1657178211577.png

Why Sum(backlog_accessories_quantity) is 4 not 2?

Labels (4)
3 Replies
OmarBenSalem
Partner - Champion II
Partner - Champion II

because in your model, the  table containing the "backlog_accessories_quantity" field is associated to another table.

This association might cause a duplication in your lines.

 

Let me try to explain it simpler with an example:

Table 1:

ID SALES
1 2

 

Table 2:

ID DATE
1 DATE1
1 DATE2

 

When you have a model like this, if you create sum(Sales) for ID=1 it will be 4 instead of 2 because the ID=1 exists in the table 2 in 2 different lines..

Hope this was clear?

hic
Former Employee
Former Employee

Because you probably have two records in the data where backlog_accessories_quantity is 2.

Test and see what Count(backlog_accessories_quantity) evaluates to.

yuech1
Contributor
Contributor
Author

yes,thank you