Skip to main content

# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for
Search instead for
Did you mean:
Not applicable

## sum(value) doubles values

Good Morning,

I have a Problem with my Pivot.

I have a table with all docnum related to an asset. Some docnums have more than one line (doclinenum).

he calculation "sum(valuehome)" calculated wrong. It takes in every line the amount of both lines and sums up the wrong way (1.439,30 instaed of 719,65)..

I thought of just taking valuehome instaed of sum(valuehome), but then I dont get totals.

In the pic below the total of "sum(valuehome)" is wrong and only "valuehome" does not Show a Total.

How can I solve this Problem? I want to have the correct amount in every line (719,65) and the correct sum (1.439,30).

Thanks in advance.

Chris

5 Replies

Divide the sum by the count of doclinenum values: sum(valuehome)/count(total <docnum> doclinenum)

talk is cheap, supply exceeds demand

try

sum(distinct valuehome)

Creator

I would say that you need to add a distinct to the dimension 'doclinenum' =count(distinct(doclinenum))

that way you filter out the double numbers. and the count should work properly.

(I am not entirely sure, I am not able to test it right now.)

Luminary Alumni

Hi,

Try like this

Sum(Agg(Sum(MeasureName), docnum))

Regards,

Jagan.

Specialist III
Hi,  try Max rather than sum if the values are same.  Thanks Kiran Kumar
Community Browser