# New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Not applicable

## Sum function

HI ,

in my chart i am using the expression

=sum( {\$<[Job discipline] = {"10"}, [Expense group] = {"Other"}>} Cost* BaseToSEKRate / AverageRate )

For a particular job number

The cost value is 600 , BaseToSEKRate is 5 and AverageRate is 5 . and

cost value is 0 , BaseToSEKRate is 5 and AverageRate is 5

now my expression has to give me 600 as output but due to duplicate records it is giving 1200 .

What i can do so that it will not take the duplicate records into consideration.

2 Replies
Valued Contributor III

## Re: Sum function

Hi Avi Avinash,

you can try with the following expression

=sum({\$<[Job discipline] = {"10"}, [Expense group] = {"Other"}>} Distinct Cost * BaseToSEKRate / AverageRate )

Not applicable

## Re: Sum function

Hi PR@D!P,

Thanks fo rthe reply. I tried it earlier it is working fine but my question is .

if i have a record like this

jobnumber, cost,  BaseToSEKRate, AverageRate , type

1 ,600,5,5,A

1,600,5,5,B

1,600,5,5,A

.

Will it eliminate only the record 1,600,5,5,A since we are already having 1,600,5,5,A(in this case o/p will be 1200)

or both

1,600,5,5,B

1,600,5,5,A and give o/p 600

Community Browser