Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
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