Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

One-to-many duplication

Hi everybody!

I have expression sum(if(name = 'Jack', Salary*K, Salary)).
If name isnt Jack but for ex. John (as below), result is not 5000 as I need, but
10000 (5000 duplicates). Can it be solved somehow?

error loading image

thanx

2 Replies
Not applicable
Author

You need to get a count(K) in there. something like:

sum(if(name = 'Jack', Salary*K/count(K) ,Salary))

/Michael

Not applicable
Author

Hi

You can try this

If(Name='Jack',sum(Salary * K),sum(Salary))

Anders