Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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
Highlighted
Partner
Partner

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
Highlighted
Partner
Partner

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.

Highlighted
Creator
Creator

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

Highlighted
Partner
Partner

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

Let me try that again...

View solution in original post