Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SQL iif Logic in Qlikview

I want to perform the task that if done in SQL would be

Sum(IIF([Field1] = 0,[Field2],0)). 

I am having a hard time figuring out how to do it in Qlikview. I have tried

Sum({$<[Field1] = {0} >} [Field2]) .  This returned 0.

Any help would be appreciated.

1 Solution

Accepted Solutions
vincent_ardiet
Specialist
Specialist

Hi,

Have you try:   =sum(if([Field1]=0,[Field2]))  ?

Regards,

Vincent

View solution in original post

2 Replies
vincent_ardiet
Specialist
Specialist

Hi,

Have you try:   =sum(if([Field1]=0,[Field2]))  ?

Regards,

Vincent

Not applicable
Author

Thanks so much. It worked.  Who knew I should try the simplest answer first, I will be sure to do that in the future.