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: 
Anonymous
Not applicable

Sum in Straight Table Double Counting Some Rows

So I'm trying to do a sum of a dollar amount in a straight table but some rows are being counted twice.  If you look at the attached example, the row where the PARHrs are 1.3898 shows an amount of $112.20 in the table box but when I do Sum(PARAmt) in the straight table, a value of $224.40 is displayed.  This issue appears in a couple different places.  When I do a Sum(Distinct PARAmt) the true amount is displayed but I'm worried about this showing a smaller amount than expected under different scenarios.  Any insight into why the straight table would be doubling some of the values here would be greatly appreciated!  Thank you!

1 Solution

Accepted Solutions
christian77
Partner - Specialist
Partner - Specialist

Yes, it's to heavy and it took me out of the page.

Let me try that again...

View solution in original post

3 Replies
christian77
Partner - Specialist
Partner - Specialist

Hi:

I'm sending you the solution.

Aggregated by the correct field.

Don't use sum(distinct Field), since values can be the same. Distinct is used for count, at least there is a special calculation you need to do, but normally that's wrong.

In the example, see the totalizers are different but the total is the same. That means the sum and the total expression are matching, therefore, it is right.

bye.

Anonymous
Not applicable
Author

Hi Christian, I think you forgot the attachment you referred to.

christian77
Partner - Specialist
Partner - Specialist

Yes, it's to heavy and it took me out of the page.

Let me try that again...