Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
juntiporn_k
Partner - Contributor II
Partner - Contributor II

What is the difference btw. Sum(If(expr1, amount, ...)) and If(expr1, Sum(amount), ...)

I'm a newbie for QV.

Hope you guys clearify

What is the difference btw. Sum(If(condition, amount, ...)) and If(condition, Sum(amount), ...) ?

2 Replies
sunny_talwar

I don't know how to explain, but may be an example might help you understand how they are different.

I have attached an example where there are two cases when the outputs of the two will match and then places where they won't match.

Capture.PNG

I am pretty sure that the second expression will never work in a text box object (unless you have used an Aggr() function) because there is no dimension in a text box object.

Note: Second and third expressions are essentially almost same

HTH

Best,

Sunny

marcus_sommer