Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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.

Please suggest.

2 Replies
senpradip007
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 )

Hope it will help you.

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